Showing preview only (6,332K chars total). Download the full file or copy to clipboard to get everything.
Repository: acornjs/acorn
Branch: master
Commit: f25fdeda4607
Files: 122
Total size: 6.0 MB
Directory structure:
gitextract_cmmrs2kq/
├── .editorconfig
├── .gitattributes
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .mailmap
├── .npmignore
├── .npmrc
├── .nvmrc
├── .tern-project
├── AUTHORS
├── README.md
├── acorn/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── bin/
│ │ └── acorn
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── acorn.d.ts
│ ├── bin/
│ │ └── acorn.js
│ ├── expression.js
│ ├── generated/
│ │ ├── astralIdentifierCodes.js
│ │ ├── astralIdentifierStartCodes.js
│ │ ├── nonASCIIidentifierChars.js
│ │ ├── nonASCIIidentifierStartChars.js
│ │ └── scriptValuesAddedInUnicode.js
│ ├── identifier.js
│ ├── index.js
│ ├── location.js
│ ├── locutil.js
│ ├── lval.js
│ ├── node.js
│ ├── options.js
│ ├── package.json
│ ├── parseutil.js
│ ├── regexp.js
│ ├── scope.js
│ ├── scopeflags.js
│ ├── state.js
│ ├── statement.js
│ ├── tokencontext.js
│ ├── tokenize.js
│ ├── tokentype.js
│ ├── unicode-property-data.js
│ ├── util.js
│ └── whitespace.js
├── acorn-loose/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── acorn-loose.d.ts
│ ├── expression.js
│ ├── index.js
│ ├── package.json
│ ├── parseutil.js
│ ├── state.js
│ ├── statement.js
│ └── tokenize.js
├── acorn-walk/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── index.js
│ ├── package.json
│ └── walk.d.ts
├── bin/
│ ├── generate-identifier-regex.js
│ ├── generate-unicode-script-values.js
│ ├── run_test262.js
│ ├── test262.unsupported-features
│ ├── test262.whitelist
│ └── update_authors.sh
├── eslint.config.mjs
├── package.json
└── test/
├── bench/
│ ├── common.js
│ ├── fixtures/
│ │ ├── angular.js
│ │ ├── backbone.js
│ │ ├── ember.js
│ │ ├── jquery.js
│ │ ├── react-dom.js
│ │ └── react.js
│ ├── index.html
│ ├── index.js
│ ├── package.json
│ └── worker.js
├── driver.js
├── run.js
├── tests-async-iteration.js
├── tests-asyncawait.js
├── tests-await-top-level.js
├── tests-bigint.js
├── tests-class-features-2022.js
├── tests-commonjs.js
├── tests-directive.js
├── tests-dynamic-import.js
├── tests-es7.js
├── tests-export-all-as-ns-from-source.js
├── tests-export-named.js
├── tests-harmony.js
├── tests-import-attributes.js
├── tests-import-meta.js
├── tests-json-superset.js
├── tests-logical-assignment-operators.js
├── tests-module-string-names.js
├── tests-nullish-coalescing.js
├── tests-numeric-separators.js
├── tests-optional-catch-binding.js
├── tests-optional-chaining.js
├── tests-regexp-2018.js
├── tests-regexp-2020.js
├── tests-regexp-2022.js
├── tests-regexp-2024.js
├── tests-regexp-2025.js
├── tests-regexp.js
├── tests-rest-spread-properties.js
├── tests-template-literal-revision.js
├── tests-trailing-commas-in-func.js
├── tests-using.js
└── tests.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
================================================
FILE: .gitattributes
================================================
* text eol=lf
================================================
FILE: .github/workflows/ci.yml
================================================
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: ci
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
name: Check code style
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: node --run lint
build-and-test:
runs-on: ubuntu-latest
name: Build and test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: node --run test
- run: node --run test:test262
================================================
FILE: .gitignore
================================================
.DS_Store
.tern-port
/node_modules
/local
/acorn/dist
/acorn-loose/dist
/acorn-walk/dist
/yarn.lock
================================================
FILE: .mailmap
================================================
Adrian Heine <mail@adrianheine.de>
Alistair Braidwood <alistair_braidwood@yahoo.co.uk>
Forbes Lindesay <forbes@lindesay.co.uk>
Rich Harris <richard.a.harris@gmail.com>
================================================
FILE: .npmignore
================================================
/.tern-port
/test
/local
/rollup
/bin/generate-identifier-regex.js
/bin/update_authors.sh
.editorconfig
.gitattributes
.tern-project
.travis.yml
/src
yarn-error.log
================================================
FILE: .npmrc
================================================
package-lock = true
================================================
FILE: .nvmrc
================================================
22
================================================
FILE: .tern-project
================================================
{
"plugins": {
"node": true,
"es_modules": true
}
}
================================================
FILE: AUTHORS
================================================
List of Acorn contributors. Updated before every release.
adams85
Adam Walsh
Adrian Heine
Adrian Rakovsky
Alex
Alistair Braidwood
Amila Welihinda
Andres Suarez
Angelo
Aparajita Fishman
Arian Stolwijk
Artem Govorov
Augustin Mauroy
baseballyama
Benedikt Meurer
Ben Page
bojavou
Boopesh Mahendran
Bradley Heinz
Brandon Mills
Brett Zamir
Brian Donovan
Brian Orora
bvanjoi
Charles Hughes
Charmander
Chris McKnight
Conrad Irwin
Cyril Auburtin
Daniel Nalborczyk
Daniel Tschinder
David Bonnet
daychongyang
dnalborczyk
Domenico Matteo
ehmicky
elixiao
ericrannaud
eryue0220
Eugene Obrezkov
Fabien LOISON
Felix Maier
fn ⌃ ⌥
Forbes Lindesay
Gabriel Miranda
Gilad Peleg
HonkingGoose
Huáng Jùnliàng
ibr4qr
impinball
Ingvar Stepanyan
Jackson Ray Hamilton
Jan Štola
Jesse McCarthy
Jiaxing Wang
Joe Krump
Joel Kemp
Johannes Herr
John-David Dalton
Jordan Gensler
Jordan Harband
Jordan Klassen
Julian Wyzykowski
Jürg Lehni
Kai Cataldo
keeyipchan
Keheliya Gallaba
Kevin Irish
Kevin Kwok
Koichi ITO
krator
kyranet
laosb
Lucas Mirelmann
luckyzeng
Marek
Marijn Haverbeke
Martin Carlberg
Mateusz Burzyński
Mat Garcia
Mathias Bynens
Mathieu 'p01' Henri
Matthew Bastien
Max Schaefer
Max Zerzouri
mickey-gs
Mihai Bazon
Mike Rennie
naoh
Nauja
Nicholas C. Zakas
Nick Fitzgerald
Norbiros
Olivier Thomann
Oskar Schöldström
ota-meshi
overlookmotel
Paul Harper
peakchen90
Peter Rust
piotr
PlNG
Praveen N
Prayag Verma
ReadmeCritic
r-e-d
Renée Kooi
Richard Gibson
Rich Harris
Robert Palmer
Rouven Weßling
Sebastian McKenzie
Shahar Soel
Sheel Bedi
Simen Bekkhus
sosukesuzuki
susiwen
susiwen8
Tanimodori
Teddy Katz
Timothy Gu
Timo Tijhof
Tim van der Lippe
Tony Ross
Toru Nagashima
tuesmiddt
tyrealhu
Vanilla
Victor Homyakov
Vladislav Tupikin
Wexpo Lyu
Yosuke Ota
Žiga Zupančič
zsjforcn
就是喜欢陈粒
成仕伟
星灵
胡文彬
龙腾道
================================================
FILE: README.md
================================================
# <img src="https://raw.githubusercontent.com/acornjs/acorn/refs/heads/master/logo.svg" alt="Acorn Logo" width="100"> Acorn
[](https://github.com/acornjs/acorn/actions)
[](https://www.npmjs.com/package/acorn)
[](https://cdnjs.com/libraries/acorn)
A tiny, fast JavaScript parser, written completely in JavaScript.
## Community
<a href="https://stand-with-ukraine.pp.ua/"><img src="https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg" width="800"></a>
Acorn is open source software released under an
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
You are welcome to
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
requests on [github](https://github.com/acornjs/acorn).
## Packages
This repository holds three packages:
- [acorn](https://github.com/acornjs/acorn/tree/master/acorn/): The
main parser
- [acorn-loose](https://github.com/acornjs/acorn/tree/master/acorn-loose/): The
error-tolerant parser
- [acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk/): The
syntax tree walker
To build the content of the repository, run `npm install`.
```sh
git clone https://github.com/acornjs/acorn.git
cd acorn
npm install
```
## Plugin developments
Acorn is designed to support plugins which can, within reasonable
bounds, redefine the way the parser works. Plugins can add new token
types and new tokenizer contexts (if necessary), and extend methods in
the parser object. This is not a clean, elegant API—using it requires
an understanding of Acorn's internals, and plugins are likely to break
whenever those internals are significantly changed. But still, it is
_possible_, in this way, to create parsers for JavaScript dialects
without forking all of Acorn. And in principle it is even possible to
combine such plugins, so that if you have, for example, a plugin for
parsing types and a plugin for parsing JSX-style XML literals, you
could load them both and parse code with both JSX tags and types.
A plugin is a function from a parser class to an extended parser
class. Plugins can be used by simply applying them to the `Parser`
class (or a version of that already extended by another plugin). But
because that gets a little awkward, syntactically, when you are using
multiple plugins, the static method `Parser.extend` can be called with
any number of plugin values as arguments to create a `Parser` class
extended by all those plugins. You'll usually want to create such an
extended class only once, and then repeatedly call `parse` on it, to
avoid needlessly confusing the JavaScript engine's optimizer.
```javascript
const {Parser} = require("acorn")
const MyParser = Parser.extend(
require("acorn-jsx")(),
require("acorn-bigint")
)
console.log(MyParser.parse("// Some bigint + JSX code"))
```
Plugins override methods in their new parser class to implement
additional functionality. It is recommended for a plugin package to
export its plugin function as its default value or, if it takes
configuration parameters, to export a constructor function that
creates the plugin function.
This is what a trivial plugin, which adds a bit of code to the
`readToken` method, might look like:
```javascript
module.exports = function noisyReadToken(Parser) {
return class extends Parser {
readToken(code) {
console.log("Reading a token!")
super.readToken(code)
}
}
}
```
================================================
FILE: acorn/.npmignore
================================================
.tern-*
/rollup.config.*
/src
================================================
FILE: acorn/CHANGELOG.md
================================================
## 8.16.0 (2026-02-19)
### New features
The `sourceType` option can now be set to `"commonjs"` to have the parser treat the top level scope as a function scope.
Add support for Unicode 17.
### Bug fixes
Don't recognize `await using` as contextual keywords when followed directly by a backslash.
Fix an issue where the parser would allow `return` statements in `static` blocks when `allowReturnOutsideFunction` was enabled.
Properly reject `using` declarations that appear directly in `switch` or `for` head scopes.
Fix some corner case issues in the recognition of `using` syntax.
## 8.15.0 (2025-06-08)
### New features
Support `using` and `await using` syntax.
The `AnyNode` type is now defined in such a way that plugins can extend it.
### Bug fixes
Fix an issue where the `bigint` property of literal nodes for non-decimal bigints had the wrong format.
The `acorn` CLI tool no longer crashes when emitting a tree that contains a bigint.
## 8.14.1 (2025-03-05)
### Bug fixes
Fix an issue where `await` expressions in class field initializers were inappropriately allowed.
Properly allow await inside an async arrow function inside a class field initializer.
Mention the source file name in syntax error messages when given.
Properly add an empty `attributes` property to every form of `ExportNamedDeclaration`.
## 8.14.0 (2024-10-27)
### New features
Support ES2025 import attributes.
Support ES2025 RegExp modifiers.
### Bug fixes
Support some missing Unicode properties.
## 8.13.0 (2024-10-16)
### New features
Upgrade to Unicode 16.0.
## 8.12.1 (2024-07-03)
### Bug fixes
Fix a regression that caused Acorn to no longer run on Node versions <8.10.
## 8.12.0 (2024-06-14)
### New features
Support ES2025 duplicate capture group names in regular expressions.
### Bug fixes
Include `VariableDeclarator` in the `AnyNode` type so that walker objects can refer to it without getting a type error.
Properly raise a parse error for invalid `for`/`of` statements using `async` as binding name.
Properly recognize \"use strict\" when preceded by a string with an escaped newline.
Mark the `Parser` constructor as protected, not private, so plugins can extend it without type errors.
Fix a bug where some invalid `delete` expressions were let through when the operand was parenthesized and `preserveParens` was enabled.
Properly normalize line endings in raw strings of invalid template tokens.
Properly track line numbers for escaped newlines in strings.
Fix a bug that broke line number accounting after a template literal with invalid escape sequences.
## 8.11.3 (2023-12-29)
### Bug fixes
Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
## 8.11.2 (2023-10-27)
### Bug fixes
Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances.
## 8.11.1 (2023-10-26)
### Bug fixes
Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens.
## 8.11.0 (2023-10-26)
### Bug fixes
Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state.
Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression.
### New features
Upgrade to Unicode 15.1.
Use a set of new, much more precise, TypeScript types.
## 8.10.0 (2023-07-05)
### New features
Add a `checkPrivateFields` option that disables strict checking of private property use.
## 8.9.0 (2023-06-16)
### Bug fixes
Forbid dynamic import after `new`, even when part of a member expression.
### New features
Add Unicode properties for ES2023.
Add support for the `v` flag to regular expressions.
## 8.8.2 (2023-01-23)
### Bug fixes
Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`.
Fix an exception when passing no option object to `parse` or `new Parser`.
Fix incorrect parse error on `if (0) let\n[astral identifier char]`.
## 8.8.1 (2022-10-24)
### Bug fixes
Make type for `Comment` compatible with estree types.
## 8.8.0 (2022-07-21)
### Bug fixes
Allow parentheses around spread args in destructuring object assignment.
Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
### New features
Support hashbang comments by default in ECMAScript 2023 and later.
## 8.7.1 (2021-04-26)
### Bug fixes
Stop handling `"use strict"` directives in ECMAScript versions before 5.
Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
Add missing type for `tokTypes`.
## 8.7.0 (2021-12-27)
### New features
Support quoted export names.
Upgrade to Unicode 14.
Add support for Unicode 13 properties in regular expressions.
### Bug fixes
Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
## 8.6.0 (2021-11-18)
### Bug fixes
Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
### New features
Support class private fields with the `in` operator.
## 8.5.0 (2021-09-06)
### Bug fixes
Improve context-dependent tokenization in a number of corner cases.
Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
Fix wrong end locations stored on SequenceExpression nodes.
Implement restriction that `for`/`of` loop LHS can't start with `let`.
### New features
Add support for ES2022 class static blocks.
Allow multiple input files to be passed to the CLI tool.
## 8.4.1 (2021-06-24)
### Bug fixes
Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
## 8.4.0 (2021-06-11)
### New features
A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
## 8.3.0 (2021-05-31)
### New features
Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
## 8.2.4 (2021-05-04)
### Bug fixes
Fix spec conformity in corner case 'for await (async of ...)'.
## 8.2.3 (2021-05-04)
### Bug fixes
Fix an issue where the library couldn't parse 'for (async of ...)'.
Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
## 8.2.2 (2021-04-29)
### Bug fixes
Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
## 8.2.1 (2021-04-24)
### Bug fixes
Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
## 8.2.0 (2021-04-24)
### New features
Add support for ES2022 class fields and private methods.
## 8.1.1 (2021-04-12)
### Various
Stop shipping source maps in the NPM package.
## 8.1.0 (2021-03-09)
### Bug fixes
Fix a spurious error in nested destructuring arrays.
### New features
Expose `allowAwaitOutsideFunction` in CLI interface.
Make `allowImportExportAnywhere` also apply to `import.meta`.
## 8.0.5 (2021-01-25)
### Bug fixes
Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
## 8.0.4 (2020-10-05)
### Bug fixes
Make `await x ** y` an error, following the spec.
Fix potentially exponential regular expression.
## 8.0.3 (2020-10-02)
### Bug fixes
Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
## 8.0.2 (2020-09-30)
### Bug fixes
Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
Fix another regexp/division tokenizer issue.
## 8.0.1 (2020-08-12)
### Bug fixes
Provide the correct value in the `version` export.
## 8.0.0 (2020-08-12)
### Bug fixes
Disallow expressions like `(a = b) = c`.
Make non-octal escape sequences a syntax error in strict mode.
### New features
The package can now be loaded directly as an ECMAScript module in node 13+.
Update to the set of Unicode properties from ES2021.
### Breaking changes
The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
Some changes to method signatures that may be used by plugins.
## 7.4.0 (2020-08-03)
### New features
Add support for logical assignment operators.
Add support for numeric separators.
## 7.3.1 (2020-06-11)
### Bug fixes
Make the string in the `version` export match the actual library version.
## 7.3.0 (2020-06-11)
### Bug fixes
Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
### New features
Add support for optional chaining (`?.`).
## 7.2.0 (2020-05-09)
### Bug fixes
Fix precedence issue in parsing of async arrow functions.
### New features
Add support for nullish coalescing.
Add support for `import.meta`.
Support `export * as ...` syntax.
Upgrade to Unicode 13.
## 6.4.1 (2020-03-09)
### Bug fixes
More carefully check for valid UTF16 surrogate pairs in regexp validator.
## 7.1.1 (2020-03-01)
### Bug fixes
Treat `\8` and `\9` as invalid escapes in template strings.
Allow unicode escapes in property names that are keywords.
Don't error on an exponential operator expression as argument to `await`.
More carefully check for valid UTF16 surrogate pairs in regexp validator.
## 7.1.0 (2019-09-24)
### Bug fixes
Disallow trailing object literal commas when ecmaVersion is less than 5.
### New features
Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
## 7.0.0 (2019-08-13)
### Breaking changes
Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
Makes 10 (ES2019) the default value for the `ecmaVersion` option.
## 6.3.0 (2019-08-12)
### New features
`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
## 6.2.1 (2019-07-21)
### Bug fixes
Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
## 6.2.0 (2019-07-04)
### Bug fixes
Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
Disallow binding `let` in patterns.
### New features
Support bigint syntax with `ecmaVersion` >= 11.
Support dynamic `import` syntax with `ecmaVersion` >= 11.
Upgrade to Unicode version 12.
## 6.1.1 (2019-02-27)
### Bug fixes
Fix bug that caused parsing default exports of with names to fail.
## 6.1.0 (2019-02-08)
### Bug fixes
Fix scope checking when redefining a `var` as a lexical binding.
### New features
Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
## 6.0.7 (2019-02-04)
### Bug fixes
Check that exported bindings are defined.
Don't treat `\u180e` as a whitespace character.
Check for duplicate parameter names in methods.
Don't allow shorthand properties when they are generators or async methods.
Forbid binding `await` in async arrow function's parameter list.
## 6.0.6 (2019-01-30)
### Bug fixes
The content of class declarations and expressions is now always parsed in strict mode.
Don't allow `let` or `const` to bind the variable name `let`.
Treat class declarations as lexical.
Don't allow a generator function declaration as the sole body of an `if` or `else`.
Ignore `"use strict"` when after an empty statement.
Allow string line continuations with special line terminator characters.
Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
Fix bug with parsing `yield` in a `for` loop initializer.
Implement special cases around scope checking for functions.
## 6.0.5 (2019-01-02)
### Bug fixes
Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
Don't treat `let` as a keyword when the next token is `{` on the next line.
Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
## 6.0.4 (2018-11-05)
### Bug fixes
Further improvements to tokenizing regular expressions in corner cases.
## 6.0.3 (2018-11-04)
### Bug fixes
Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
Remove stray symlink in the package tarball.
## 6.0.2 (2018-09-26)
### Bug fixes
Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
## 6.0.1 (2018-09-14)
### Bug fixes
Fix wrong value in `version` export.
## 6.0.0 (2018-09-14)
### Bug fixes
Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
Forbid `new.target` in top-level arrow functions.
Fix issue with parsing a regexp after `yield` in some contexts.
### New features
The package now comes with TypeScript definitions.
### Breaking changes
The default value of the `ecmaVersion` option is now 9 (2018).
Plugins work differently, and will have to be rewritten to work with this version.
The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
## 5.7.3 (2018-09-10)
### Bug fixes
Fix failure to tokenize regexps after expressions like `x.of`.
Better error message for unterminated template literals.
## 5.7.2 (2018-08-24)
### Bug fixes
Properly handle `allowAwaitOutsideFunction` in for statements.
Treat function declarations at the top level of modules like let bindings.
Don't allow async function declarations as the only statement under a label.
## 5.7.0 (2018-06-15)
### New features
Upgraded to Unicode 11.
## 5.6.0 (2018-05-31)
### New features
Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
Allow binding-less catch statements when ECMAVersion >= 10.
Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
## 5.5.3 (2018-03-08)
### Bug fixes
A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
## 5.5.2 (2018-03-08)
### Bug fixes
A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
## 5.5.1 (2018-03-06)
### Bug fixes
Fix misleading error message for octal escapes in template strings.
## 5.5.0 (2018-02-27)
### New features
The identifier character categorization is now based on Unicode version 10.
Acorn will now validate the content of regular expressions, including new ES9 features.
## 5.4.0 (2018-02-01)
### Bug fixes
Disallow duplicate or escaped flags on regular expressions.
Disallow octal escapes in strings in strict mode.
### New features
Add support for async iteration.
Add support for object spread and rest.
## 5.3.0 (2017-12-28)
### Bug fixes
Fix parsing of floating point literals with leading zeroes in loose mode.
Allow duplicate property names in object patterns.
Don't allow static class methods named `prototype`.
Disallow async functions directly under `if` or `else`.
Parse right-hand-side of `for`/`of` as an assignment expression.
Stricter parsing of `for`/`in`.
Don't allow unicode escapes in contextual keywords.
### New features
Parsing class members was factored into smaller methods to allow plugins to hook into it.
## 5.2.1 (2017-10-30)
### Bug fixes
Fix a token context corruption bug.
## 5.2.0 (2017-10-30)
### Bug fixes
Fix token context tracking for `class` and `function` in property-name position.
Make sure `%*` isn't parsed as a valid operator.
Allow shorthand properties `get` and `set` to be followed by default values.
Disallow `super` when not in callee or object position.
### New features
Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
## 5.1.2 (2017-09-04)
### Bug fixes
Disable parsing of legacy HTML-style comments in modules.
Fix parsing of async methods whose names are keywords.
## 5.1.1 (2017-07-06)
### Bug fixes
Fix problem with disambiguating regexp and division after a class.
## 5.1.0 (2017-07-05)
### Bug fixes
Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
Parse zero-prefixed numbers with non-octal digits as decimal.
Allow object/array patterns in rest parameters.
Don't error when `yield` is used as a property name.
Allow `async` as a shorthand object property.
### New features
Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
## 5.0.3 (2017-04-01)
### Bug fixes
Fix spurious duplicate variable definition errors for named functions.
## 5.0.2 (2017-03-30)
### Bug fixes
A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
## 5.0.0 (2017-03-28)
### Bug fixes
Raise an error for duplicated lexical bindings.
Fix spurious error when an assignement expression occurred after a spread expression.
Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
Allow labels in front or `var` declarations, even in strict mode.
### Breaking changes
Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
## 4.0.11 (2017-02-07)
### Bug fixes
Allow all forms of member expressions to be parenthesized as lvalue.
## 4.0.10 (2017-02-07)
### Bug fixes
Don't expect semicolons after default-exported functions or classes, even when they are expressions.
Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
## 4.0.9 (2017-02-06)
### Bug fixes
Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
## 4.0.8 (2017-02-03)
### Bug fixes
Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
## 4.0.7 (2017-02-02)
### Bug fixes
Accept invalidly rejected code like `(x).y = 2` again.
Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
## 4.0.6 (2017-02-02)
### Bug fixes
Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
## 4.0.5 (2017-02-02)
### Bug fixes
Disallow parenthesized pattern expressions.
Allow keywords as export names.
Don't allow the `async` keyword to be parenthesized.
Properly raise an error when a keyword contains a character escape.
Allow `"use strict"` to appear after other string literal expressions.
Disallow labeled declarations.
## 4.0.4 (2016-12-19)
### Bug fixes
Fix crash when `export` was followed by a keyword that can't be
exported.
## 4.0.3 (2016-08-16)
### Bug fixes
Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
Properly parse properties named `async` in ES2017 mode.
Fix bug where reserved words were broken in ES2017 mode.
## 4.0.2 (2016-08-11)
### Bug fixes
Don't ignore period or 'e' characters after octal numbers.
Fix broken parsing for call expressions in default parameter values of arrow functions.
## 4.0.1 (2016-08-08)
### Bug fixes
Fix false positives in duplicated export name errors.
## 4.0.0 (2016-08-07)
### Breaking changes
The default `ecmaVersion` option value is now 7.
A number of internal method signatures changed, so plugins might need to be updated.
### Bug fixes
The parser now raises errors on duplicated export names.
`arguments` and `eval` can now be used in shorthand properties.
Duplicate parameter names in non-simple argument lists now always produce an error.
### New features
The `ecmaVersion` option now also accepts year-style version numbers
(2015, etc).
Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
## 3.3.0 (2016-07-25)
### Bug fixes
Fix bug in tokenizing of regexp operator after a function declaration.
Fix parser crash when parsing an array pattern with a hole.
### New features
Implement check against complex argument lists in functions that enable strict mode in ES7.
## 3.2.0 (2016-06-07)
### Bug fixes
Improve handling of lack of unicode regexp support in host
environment.
Properly reject shorthand properties whose name is a keyword.
### New features
Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
## 3.1.0 (2016-04-18)
### Bug fixes
Properly tokenize the division operator directly after a function expression.
Allow trailing comma in destructuring arrays.
## 3.0.4 (2016-02-25)
### Fixes
Allow update expressions as left-hand-side of the ES7 exponential operator.
## 3.0.2 (2016-02-10)
### Fixes
Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
## 3.0.0 (2016-02-10)
### Breaking changes
The default value of the `ecmaVersion` option is now 6 (used to be 5).
Support for comprehension syntax (which was dropped from the draft spec) has been removed.
### Fixes
`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
A parenthesized class or function expression after `export default` is now parsed correctly.
### New features
When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
The identifier character ranges are now based on Unicode 8.0.0.
Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
## 2.7.0 (2016-01-04)
### Fixes
Stop allowing rest parameters in setters.
Disallow `y` rexexp flag in ES5.
Disallow `\00` and `\000` escapes in strict mode.
Raise an error when an import name is a reserved word.
## 2.6.2 (2015-11-10)
### Fixes
Don't crash when no options object is passed.
## 2.6.0 (2015-11-09)
### Fixes
Add `await` as a reserved word in module sources.
Disallow `yield` in a parameter default value for a generator.
Forbid using a comma after a rest pattern in an array destructuring.
### New features
Support parsing stdin in command-line tool.
## 2.5.0 (2015-10-27)
### Fixes
Fix tokenizer support in the command-line tool.
Stop allowing `new.target` outside of functions.
Remove legacy `guard` and `guardedHandler` properties from try nodes.
Stop allowing multiple `__proto__` properties on an object literal in strict mode.
Don't allow rest parameters to be non-identifier patterns.
Check for duplicate paramter names in arrow functions.
================================================
FILE: acorn/LICENSE
================================================
MIT License
Copyright (C) 2012-2022 by various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
================================================
FILE: acorn/README.md
================================================
# Acorn
A tiny, fast JavaScript parser written in JavaScript.
## Community
Acorn is open source software released under an
[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
You are welcome to
[report bugs](https://github.com/acornjs/acorn/issues) or create pull
requests on [github](https://github.com/acornjs/acorn).
## Installation
The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
```sh
npm install acorn
```
Alternately, you can download the source and build acorn yourself:
```sh
git clone https://github.com/acornjs/acorn.git
cd acorn
npm install
```
## Importing acorn
ESM as well as CommonJS is supported for all 3: `acorn`, `acorn-walk` and `acorn-loose`.
ESM example for `acorn`:
```js
import * as acorn from "acorn"
```
CommonJS example for `acorn`:
```js
let acorn = require("acorn")
```
ESM is preferred, as it allows better editor auto-completions by offering TypeScript support.
For this reason, following examples will use ESM imports.
## Interface
**parse**`(input, options)` is the main interface to the library. The
`input` parameter is a string, `options` must be an object setting
some of the options listed below. The return value will be an abstract
syntax tree object as specified by the [ESTree
spec](https://github.com/estree/estree).
```javascript
import * as acorn from "acorn"
console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}))
```
When encountering a syntax error, the parser will raise a
`SyntaxError` object with a meaningful message. The error object will
have a `pos` property that indicates the string offset at which the
error occurred, and a `loc` object that contains a `{line, column}`
object referring to that same position.
Options are provided by in a second argument, which should be an
object containing any of these fields (only `ecmaVersion` is
required):
- **ecmaVersion**: Indicates the ECMAScript version to parse. Can be a
number, either in year (`2022`) or plain version number (`6`) form,
or `"latest"` (the latest the library supports). This influences
support for strict mode, the set of reserved words, and support for
new syntax features.
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
implemented by Acorn. Other proposed new features must be
implemented through plugins.
- **sourceType**: Indicate the mode the code should be parsed in. Can be
either `"script"`, `"module"` or `"commonjs"`. This influences global strict mode
and parsing of `import` and `export` declarations.
**NOTE**: If set to `"module"`, then static `import` / `export` syntax
will be valid, even if `ecmaVersion` is less than 6. If set to `"commonjs"`,
it is the same as `"script"` except that the top-level scope behaves like a function.
- **onInsertedSemicolon**: If given a callback, that callback will be
called whenever a missing semicolon is inserted by the parser. The
callback will be given the character offset of the point where the
semicolon is inserted as argument, and if `locations` is on, also a
`{line, column}` object representing this position.
- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
commas.
- **allowReserved**: If `false`, using a reserved word will generate
an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
versions. When given the value `"never"`, reserved words and
keywords can also not be used as property names (as in Internet
Explorer's old parser).
- **allowReturnOutsideFunction**: By default, a return statement at
the top level raises an error. Set this to `true` to accept such
code.
- **allowImportExportEverywhere**: By default, `import` and `export`
declarations can only appear at a program's top level. Setting this
option to `true` allows them anywhere where a statement is allowed,
and also allows `import.meta` expressions to appear in scripts
(when `sourceType` is not `"module"`).
- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
only appear inside `async` functions. Defaults to `true` in modules
for `ecmaVersion` 2022 and later, `false` for lower versions.
Setting this option to `true` allows to have top-level `await`
expressions. They are still not allowed in non-`async` functions,
though. Setting this option to `true` is not allowed when `sourceType: "commonjs"`.
- **allowSuperOutsideMethod**: By default, `super` outside a method
raises an error. Set this to `true` to accept such code.
- **allowHashBang**: When this is enabled, if the code starts with the
characters `#!` (as in a shellscript), the first line will be
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
- **checkPrivateFields**: By default, the parser will verify that
private properties are only used in places where they are valid and
have been declared. Set this to false to turn such checks off.
- **locations**: When `true`, each node has a `loc` object attached
with `start` and `end` subobjects, each of which contains the
one-based line and zero-based column numbers in `{line, column}`
form. Default is `false`.
- **onToken**: If a function is passed for this option, each found
token will be passed in same format as tokens returned from
`tokenizer().getToken()`.
If array is passed, each found token is pushed to it.
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **onComment**: If a function is passed for this option, whenever a
comment is encountered the function will be called with the
following parameters:
- `block`: `true` if the comment is a block comment, false if it
is a line comment.
- `text`: The content of the comment.
- `start`: Character offset of the start of the comment.
- `end`: Character offset of the end of the comment.
When the `locations` options is on, the `{line, column}` locations
of the comment’s start and end are passed as two additional
parameters.
If array is passed for this option, each found comment is pushed
to it as object in Esprima format:
```javascript
{
"type": "Line" | "Block",
"value": "comment text",
"start": Number,
"end": Number,
// If `locations` option is on:
"loc": {
"start": {line: Number, column: Number}
"end": {line: Number, column: Number}
},
// If `ranges` option is on:
"range": [Number, Number]
}
```
Note that you are not allowed to call the parser from the
callback—that will corrupt its internal state.
- **ranges**: Nodes have their start and end characters offsets
recorded in `start` and `end` properties (directly on the node,
rather than the `loc` object, which holds line/column data. To also
add a
[semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
`range` property holding a `[start, end]` array with the same
numbers, set the `ranges` option to `true`.
- **program**: It is possible to parse multiple files into a single
AST by passing the tree produced by parsing the first file as the
`program` option in subsequent parses. This will add the toplevel
forms of the parsed file to the "Program" (top) node of an existing
parse tree.
- **sourceFile**: When the `locations` option is `true`, you can pass
this option to add a `source` attribute in every node’s `loc`
object. Note that the contents of this option are not examined or
processed in any way; you are free to use whatever format you
choose.
- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
will be added (regardless of the `location` option) directly to the
nodes, rather than the `loc` object.
- **preserveParens**: If this option is `true`, parenthesized expressions
are represented by (non-standard) `ParenthesizedExpression` nodes
that have a single `expression` property containing the expression
inside parentheses.
**parseExpressionAt**`(input, offset, options)` will parse a single
expression in a string, and return its AST. It will not complain if
there is more of the string left after the expression.
**tokenizer**`(input, options)` returns an object with a `getToken`
method that can be called repeatedly to get the next token, a `{start,
end, type, value}` object (with added `loc` property when the
`locations` option is enabled and `range` property when the `ranges`
option is enabled). When the token's type is `tokTypes.eof`, you
should stop calling the method, since it will keep returning that same
token forever.
Note that tokenizing JavaScript without parsing it is, in modern
versions of the language, not really possible due to the way syntax is
overloaded in ways that can only be disambiguated by the parse
context. This package applies a bunch of heuristics to try and do a
reasonable job, but you are advised to use `parse` with the `onToken`
option instead of this.
In ES6 environment, returned result can be used as any other
protocol-compliant iterable:
```javascript
for (let token of acorn.tokenizer(str)) {
// iterate over the tokens
}
// transform code to array of tokens:
var tokens = [...acorn.tokenizer(str)]
```
**tokTypes** holds an object mapping names to the token type objects
that end up in the `type` properties of tokens.
**getLineInfo**`(input, offset)` can be used to get a `{line,
column}` object for a given program string and offset.
### The `Parser` class
Instances of the **`Parser`** class contain all the state and logic
that drives a parse. It has static methods `parse`,
`parseExpressionAt`, and `tokenizer` that match the top-level
functions by the same name.
When extending the parser with plugins, you need to call these methods
on the extended version of the class. To extend a parser with plugins,
you can use its static `extend` method.
```javascript
var acorn = require("acorn")
var jsx = require("acorn-jsx")
var JSXParser = acorn.Parser.extend(jsx())
JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020})
```
The `extend` method takes any number of plugin values, and returns a
new `Parser` class that includes the extra parser logic provided by
the plugins.
## Command line interface
The `bin/acorn` utility can be used to parse a file from the command
line. It accepts as arguments its input file and the following
options:
- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
to parse. Default is version 9.
- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
- `--locations`: Attaches a "loc" object to each node with "start" and
"end" subobjects, each of which contains the one-based line and
zero-based column numbers in `{line, column}` form.
- `--allow-hash-bang`: If the code starts with the characters #! (as
in a shellscript), the first line will be treated as a comment.
- `--allow-await-outside-function`: Allows top-level `await` expressions.
See the `allowAwaitOutsideFunction` option for more information.
- `--compact`: No whitespace is used in the AST output.
- `--silent`: Do not output the AST, just return the exit status.
- `--help`: Print the usage information and quit.
The utility spits out the syntax tree as JSON data.
## Existing plugins
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
================================================
FILE: acorn/bin/acorn
================================================
#!/usr/bin/env node
"use strict"
require("../dist/bin.js")
================================================
FILE: acorn/package.json
================================================
{
"name": "acorn",
"description": "ECMAScript parser",
"homepage": "https://github.com/acornjs/acorn",
"main": "dist/acorn.js",
"types": "dist/acorn.d.ts",
"module": "dist/acorn.mjs",
"exports": {
".": [
{
"import": "./dist/acorn.mjs",
"require": "./dist/acorn.js",
"default": "./dist/acorn.js"
},
"./dist/acorn.js"
],
"./package.json": "./package.json"
},
"version": "8.16.0",
"engines": {
"node": ">=0.4.0"
},
"maintainers": [
{
"name": "Marijn Haverbeke",
"email": "marijnh@gmail.com",
"web": "https://marijnhaverbeke.nl"
},
{
"name": "Ingvar Stepanyan",
"email": "me@rreverser.com",
"web": "https://rreverser.com/"
},
{
"name": "Adrian Heine",
"web": "http://adrianheine.de"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/acornjs/acorn.git"
},
"license": "MIT",
"scripts": {
"prepare": "cd ..; npm run build:main"
},
"bin": {
"acorn": "bin/acorn"
}
}
================================================
FILE: acorn/rollup.config.mjs
================================================
import {readFile, writeFile} from "node:fs/promises"
import buble from "@rollup/plugin-buble"
const copy = (from, to) => ({
async writeBundle() { await writeFile(to, await readFile(from)) }
})
export default [
{
input: "acorn/src/index.js",
output: [
{
file: "acorn/dist/acorn.js",
format: "umd",
name: "acorn"
},
{
file: "acorn/dist/acorn.mjs",
format: "es"
}
],
plugins: [
buble({transforms: {dangerousForOf: true}}),
copy("acorn/src/acorn.d.ts", "acorn/dist/acorn.d.ts"),
copy("acorn/src/acorn.d.ts", "acorn/dist/acorn.d.mts")
]
},
{
external: ["acorn", "fs", "path"],
input: "acorn/src/bin/acorn.js",
output: {
file: "acorn/dist/bin.js",
format: "cjs",
paths: {acorn: "./acorn.js"}
},
plugins: [
buble({transforms: {dangerousForOf: true}})
]
}
]
================================================
FILE: acorn/src/acorn.d.ts
================================================
export interface Node {
start: number
end: number
type: string
range?: [number, number]
loc?: SourceLocation | null
}
export interface SourceLocation {
source?: string | null
start: Position
end: Position
}
export interface Position {
/** 1-based */
line: number
/** 0-based */
column: number
}
export interface Identifier extends Node {
type: "Identifier"
name: string
}
export interface Literal extends Node {
type: "Literal"
value?: string | boolean | null | number | RegExp | bigint
raw?: string
regex?: {
pattern: string
flags: string
}
bigint?: string
}
export interface Program extends Node {
type: "Program"
body: Array<Statement | ModuleDeclaration>
sourceType: "script" | "module"
}
export interface Function extends Node {
id?: Identifier | null
params: Array<Pattern>
body: BlockStatement | Expression
generator: boolean
expression: boolean
async: boolean
}
export interface ExpressionStatement extends Node {
type: "ExpressionStatement"
expression: Expression | Literal
directive?: string
}
export interface BlockStatement extends Node {
type: "BlockStatement"
body: Array<Statement>
}
export interface EmptyStatement extends Node {
type: "EmptyStatement"
}
export interface DebuggerStatement extends Node {
type: "DebuggerStatement"
}
export interface WithStatement extends Node {
type: "WithStatement"
object: Expression
body: Statement
}
export interface ReturnStatement extends Node {
type: "ReturnStatement"
argument?: Expression | null
}
export interface LabeledStatement extends Node {
type: "LabeledStatement"
label: Identifier
body: Statement
}
export interface BreakStatement extends Node {
type: "BreakStatement"
label?: Identifier | null
}
export interface ContinueStatement extends Node {
type: "ContinueStatement"
label?: Identifier | null
}
export interface IfStatement extends Node {
type: "IfStatement"
test: Expression
consequent: Statement
alternate?: Statement | null
}
export interface SwitchStatement extends Node {
type: "SwitchStatement"
discriminant: Expression
cases: Array<SwitchCase>
}
export interface SwitchCase extends Node {
type: "SwitchCase"
test?: Expression | null
consequent: Array<Statement>
}
export interface ThrowStatement extends Node {
type: "ThrowStatement"
argument: Expression
}
export interface TryStatement extends Node {
type: "TryStatement"
block: BlockStatement
handler?: CatchClause | null
finalizer?: BlockStatement | null
}
export interface CatchClause extends Node {
type: "CatchClause"
param?: Pattern | null
body: BlockStatement
}
export interface WhileStatement extends Node {
type: "WhileStatement"
test: Expression
body: Statement
}
export interface DoWhileStatement extends Node {
type: "DoWhileStatement"
body: Statement
test: Expression
}
export interface ForStatement extends Node {
type: "ForStatement"
init?: VariableDeclaration | Expression | null
test?: Expression | null
update?: Expression | null
body: Statement
}
export interface ForInStatement extends Node {
type: "ForInStatement"
left: VariableDeclaration | Pattern
right: Expression
body: Statement
}
export interface FunctionDeclaration extends Function {
type: "FunctionDeclaration"
id: Identifier
body: BlockStatement
}
export interface VariableDeclaration extends Node {
type: "VariableDeclaration"
declarations: Array<VariableDeclarator>
kind: "var" | "let" | "const" | "using" | "await using"
}
export interface VariableDeclarator extends Node {
type: "VariableDeclarator"
id: Pattern
init?: Expression | null
}
export interface ThisExpression extends Node {
type: "ThisExpression"
}
export interface ArrayExpression extends Node {
type: "ArrayExpression"
elements: Array<Expression | SpreadElement | null>
}
export interface ObjectExpression extends Node {
type: "ObjectExpression"
properties: Array<Property | SpreadElement>
}
export interface Property extends Node {
type: "Property"
key: Expression
value: Expression
kind: "init" | "get" | "set"
method: boolean
shorthand: boolean
computed: boolean
}
export interface FunctionExpression extends Function {
type: "FunctionExpression"
body: BlockStatement
}
export interface UnaryExpression extends Node {
type: "UnaryExpression"
operator: UnaryOperator
prefix: boolean
argument: Expression
}
export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
export interface UpdateExpression extends Node {
type: "UpdateExpression"
operator: UpdateOperator
argument: Expression
prefix: boolean
}
export type UpdateOperator = "++" | "--"
export interface BinaryExpression extends Node {
type: "BinaryExpression"
operator: BinaryOperator
left: Expression | PrivateIdentifier
right: Expression
}
export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**"
export interface AssignmentExpression extends Node {
type: "AssignmentExpression"
operator: AssignmentOperator
left: Pattern
right: Expression
}
export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??="
export interface LogicalExpression extends Node {
type: "LogicalExpression"
operator: LogicalOperator
left: Expression
right: Expression
}
export type LogicalOperator = "||" | "&&" | "??"
export interface MemberExpression extends Node {
type: "MemberExpression"
object: Expression | Super
property: Expression | PrivateIdentifier
computed: boolean
optional: boolean
}
export interface ConditionalExpression extends Node {
type: "ConditionalExpression"
test: Expression
alternate: Expression
consequent: Expression
}
export interface CallExpression extends Node {
type: "CallExpression"
callee: Expression | Super
arguments: Array<Expression | SpreadElement>
optional: boolean
}
export interface NewExpression extends Node {
type: "NewExpression"
callee: Expression
arguments: Array<Expression | SpreadElement>
}
export interface SequenceExpression extends Node {
type: "SequenceExpression"
expressions: Array<Expression>
}
export interface ForOfStatement extends Node {
type: "ForOfStatement"
left: VariableDeclaration | Pattern
right: Expression
body: Statement
await: boolean
}
export interface Super extends Node {
type: "Super"
}
export interface SpreadElement extends Node {
type: "SpreadElement"
argument: Expression
}
export interface ArrowFunctionExpression extends Function {
type: "ArrowFunctionExpression"
}
export interface YieldExpression extends Node {
type: "YieldExpression"
argument?: Expression | null
delegate: boolean
}
export interface TemplateLiteral extends Node {
type: "TemplateLiteral"
quasis: Array<TemplateElement>
expressions: Array<Expression>
}
export interface TaggedTemplateExpression extends Node {
type: "TaggedTemplateExpression"
tag: Expression
quasi: TemplateLiteral
}
export interface TemplateElement extends Node {
type: "TemplateElement"
tail: boolean
value: {
cooked?: string | null
raw: string
}
}
export interface AssignmentProperty extends Node {
type: "Property"
key: Expression
value: Pattern
kind: "init"
method: false
shorthand: boolean
computed: boolean
}
export interface ObjectPattern extends Node {
type: "ObjectPattern"
properties: Array<AssignmentProperty | RestElement>
}
export interface ArrayPattern extends Node {
type: "ArrayPattern"
elements: Array<Pattern | null>
}
export interface RestElement extends Node {
type: "RestElement"
argument: Pattern
}
export interface AssignmentPattern extends Node {
type: "AssignmentPattern"
left: Pattern
right: Expression
}
export interface Class extends Node {
id?: Identifier | null
superClass?: Expression | null
body: ClassBody
}
export interface ClassBody extends Node {
type: "ClassBody"
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>
}
export interface MethodDefinition extends Node {
type: "MethodDefinition"
key: Expression | PrivateIdentifier
value: FunctionExpression
kind: "constructor" | "method" | "get" | "set"
computed: boolean
static: boolean
}
export interface ClassDeclaration extends Class {
type: "ClassDeclaration"
id: Identifier
}
export interface ClassExpression extends Class {
type: "ClassExpression"
}
export interface MetaProperty extends Node {
type: "MetaProperty"
meta: Identifier
property: Identifier
}
export interface ImportDeclaration extends Node {
type: "ImportDeclaration"
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>
source: Literal
attributes: Array<ImportAttribute>
}
export interface ImportSpecifier extends Node {
type: "ImportSpecifier"
imported: Identifier | Literal
local: Identifier
}
export interface ImportDefaultSpecifier extends Node {
type: "ImportDefaultSpecifier"
local: Identifier
}
export interface ImportNamespaceSpecifier extends Node {
type: "ImportNamespaceSpecifier"
local: Identifier
}
export interface ImportAttribute extends Node {
type: "ImportAttribute"
key: Identifier | Literal
value: Literal
}
export interface ExportNamedDeclaration extends Node {
type: "ExportNamedDeclaration"
declaration?: Declaration | null
specifiers: Array<ExportSpecifier>
source?: Literal | null
attributes: Array<ImportAttribute>
}
export interface ExportSpecifier extends Node {
type: "ExportSpecifier"
exported: Identifier | Literal
local: Identifier | Literal
}
export interface AnonymousFunctionDeclaration extends Function {
type: "FunctionDeclaration"
id: null
body: BlockStatement
}
export interface AnonymousClassDeclaration extends Class {
type: "ClassDeclaration"
id: null
}
export interface ExportDefaultDeclaration extends Node {
type: "ExportDefaultDeclaration"
declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression
}
export interface ExportAllDeclaration extends Node {
type: "ExportAllDeclaration"
source: Literal
exported?: Identifier | Literal | null
attributes: Array<ImportAttribute>
}
export interface AwaitExpression extends Node {
type: "AwaitExpression"
argument: Expression
}
export interface ChainExpression extends Node {
type: "ChainExpression"
expression: MemberExpression | CallExpression
}
export interface ImportExpression extends Node {
type: "ImportExpression"
source: Expression
options: Expression | null
}
export interface ParenthesizedExpression extends Node {
type: "ParenthesizedExpression"
expression: Expression
}
export interface PropertyDefinition extends Node {
type: "PropertyDefinition"
key: Expression | PrivateIdentifier
value?: Expression | null
computed: boolean
static: boolean
}
export interface PrivateIdentifier extends Node {
type: "PrivateIdentifier"
name: string
}
export interface StaticBlock extends Node {
type: "StaticBlock"
body: Array<Statement>
}
export type Statement =
| ExpressionStatement
| BlockStatement
| EmptyStatement
| DebuggerStatement
| WithStatement
| ReturnStatement
| LabeledStatement
| BreakStatement
| ContinueStatement
| IfStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| Declaration
export type Declaration =
| FunctionDeclaration
| VariableDeclaration
| ClassDeclaration
export type Expression =
| Identifier
| Literal
| ThisExpression
| ArrayExpression
| ObjectExpression
| FunctionExpression
| UnaryExpression
| UpdateExpression
| BinaryExpression
| AssignmentExpression
| LogicalExpression
| MemberExpression
| ConditionalExpression
| CallExpression
| NewExpression
| SequenceExpression
| ArrowFunctionExpression
| YieldExpression
| TemplateLiteral
| TaggedTemplateExpression
| ClassExpression
| MetaProperty
| AwaitExpression
| ChainExpression
| ImportExpression
| ParenthesizedExpression
export type Pattern =
| Identifier
| MemberExpression
| ObjectPattern
| ArrayPattern
| RestElement
| AssignmentPattern
export type ModuleDeclaration =
| ImportDeclaration
| ExportNamedDeclaration
| ExportDefaultDeclaration
| ExportAllDeclaration
/**
* This interface is only used for defining {@link AnyNode}.
* It exists so that it can be extended by plugins:
*
* @example
* ```typescript
* declare module 'acorn' {
* interface NodeTypes {
* pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
* }
* }
* ```
*/
interface NodeTypes {
core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
}
export type AnyNode = NodeTypes[keyof NodeTypes]
export function parse(input: string, options: Options): Program
export function parseExpressionAt(input: string, pos: number, options: Options): Expression
export function tokenizer(input: string, options: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
export interface Options {
/**
* `ecmaVersion` indicates the ECMAScript version to parse. Can be a
* number, either in year (`2022`) or plain version number (`6`) form,
* or `"latest"` (the latest the library supports). This influences
* support for strict mode, the set of reserved words, and support for
* new syntax features.
*/
ecmaVersion: ecmaVersion
/**
* `sourceType` indicates the mode the code should be parsed in.
* Can be either `"script"`, `"module"` or `"commonjs"`. This influences global
* strict mode and parsing of `import` and `export` declarations.
*/
sourceType?: "script" | "module" | "commonjs"
/**
* a callback that will be called when a semicolon is automatically inserted.
* @param lastTokEnd the position of the comma as an offset
* @param lastTokEndLoc location if {@link locations} is enabled
*/
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
/**
* similar to `onInsertedSemicolon`, but for trailing commas
* @param lastTokEnd the position of the comma as an offset
* @param lastTokEndLoc location if `locations` is enabled
*/
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
/**
* By default, reserved words are only enforced if ecmaVersion >= 5.
* Set `allowReserved` to a boolean value to explicitly turn this on
* an off. When this option has the value "never", reserved words
* and keywords can also not be used as property names.
*/
allowReserved?: boolean | "never"
/**
* When enabled, a return at the top level is not considered an error.
*/
allowReturnOutsideFunction?: boolean
/**
* When enabled, import/export statements are not constrained to
* appearing at the top of the program, and an import.meta expression
* in a script isn't considered an error.
*/
allowImportExportEverywhere?: boolean
/**
* By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022.
* When enabled, await identifiers are allowed to appear at the top-level scope,
* but they are still not allowed in non-async functions.
*/
allowAwaitOutsideFunction?: boolean
/**
* When enabled, super identifiers are not constrained to
* appearing in methods and do not raise an error when they appear elsewhere.
*/
allowSuperOutsideMethod?: boolean
/**
* When enabled, hashbang directive in the beginning of file is
* allowed and treated as a line comment. Enabled by default when
* {@link ecmaVersion} >= 2023.
*/
allowHashBang?: boolean
/**
* By default, the parser will verify that private properties are
* only used in places where they are valid and have been declared.
* Set this to false to turn such checks off.
*/
checkPrivateFields?: boolean
/**
* When `locations` is on, `loc` properties holding objects with
* `start` and `end` properties as {@link Position} objects will be attached to the
* nodes.
*/
locations?: boolean
/**
* a callback that will cause Acorn to call that export function with object in the same
* format as tokens returned from `tokenizer().getToken()`. Note
* that you are not allowed to call the parser from the
* callback—that will corrupt its internal state.
*/
onToken?: ((token: Token) => void) | Token[]
/**
* This takes a export function or an array.
*
* When a export function is passed, Acorn will call that export function with `(block, text, start,
* end)` parameters whenever a comment is skipped. `block` is a
* boolean indicating whether this is a block (`/* *\/`) comment,
* `text` is the content of the comment, and `start` and `end` are
* character offsets that denote the start and end of the comment.
* When the {@link locations} option is on, two more parameters are
* passed, the full locations of {@link Position} export type of the start and
* end of the comments.
*
* When a array is passed, each found comment of {@link Comment} export type is pushed to the array.
*
* Note that you are not allowed to call the
* parser from the callback—that will corrupt its internal state.
*/
onComment?: ((
isBlock: boolean, text: string, start: number, end: number, startLoc?: Position,
endLoc?: Position
) => void) | Comment[]
/**
* Nodes have their start and end characters offsets recorded in
* `start` and `end` properties (directly on the node, rather than
* the `loc` object, which holds line/column data. To also add a
* [semi-standardized][range] `range` property holding a `[start,
* end]` array with the same numbers, set the `ranges` option to
* `true`.
*/
ranges?: boolean
/**
* It is possible to parse multiple files into a single AST by
* passing the tree produced by parsing the first file as
* `program` option in subsequent parses. This will add the
* toplevel forms of the parsed file to the `Program` (top) node
* of an existing parse tree.
*/
program?: Node
/**
* When {@link locations} is on, you can pass this to record the source
* file in every node's `loc` object.
*/
sourceFile?: string
/**
* This value, if given, is stored in every node, whether {@link locations} is on or off.
*/
directSourceFile?: string
/**
* When enabled, parenthesized expressions are represented by
* (non-standard) ParenthesizedExpression nodes
*/
preserveParens?: boolean
}
export class Parser {
options: Options
input: string
protected constructor(options: Options, input: string, startPos?: number)
parse(): Program
static parse(input: string, options: Options): Program
static parseExpressionAt(input: string, pos: number, options: Options): Expression
static tokenizer(input: string, options: Options): {
getToken(): Token
[Symbol.iterator](): Iterator<Token>
}
static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser
}
export const defaultOptions: Options
export function getLineInfo(input: string, offset: number): Position
export class TokenType {
label: string
keyword: string | undefined
}
export const tokTypes: {
num: TokenType
regexp: TokenType
string: TokenType
name: TokenType
privateId: TokenType
eof: TokenType
bracketL: TokenType
bracketR: TokenType
braceL: TokenType
braceR: TokenType
parenL: TokenType
parenR: TokenType
comma: TokenType
semi: TokenType
colon: TokenType
dot: TokenType
question: TokenType
questionDot: TokenType
arrow: TokenType
template: TokenType
invalidTemplate: TokenType
ellipsis: TokenType
backQuote: TokenType
dollarBraceL: TokenType
eq: TokenType
assign: TokenType
incDec: TokenType
prefix: TokenType
logicalOR: TokenType
logicalAND: TokenType
bitwiseOR: TokenType
bitwiseXOR: TokenType
bitwiseAND: TokenType
equality: TokenType
relational: TokenType
bitShift: TokenType
plusMin: TokenType
modulo: TokenType
star: TokenType
slash: TokenType
starstar: TokenType
coalesce: TokenType
_break: TokenType
_case: TokenType
_catch: TokenType
_continue: TokenType
_debugger: TokenType
_default: TokenType
_do: TokenType
_else: TokenType
_finally: TokenType
_for: TokenType
_function: TokenType
_if: TokenType
_return: TokenType
_switch: TokenType
_throw: TokenType
_try: TokenType
_var: TokenType
_const: TokenType
_while: TokenType
_with: TokenType
_new: TokenType
_this: TokenType
_super: TokenType
_class: TokenType
_extends: TokenType
_export: TokenType
_import: TokenType
_null: TokenType
_true: TokenType
_false: TokenType
_in: TokenType
_instanceof: TokenType
_typeof: TokenType
_void: TokenType
_delete: TokenType
}
export interface Comment {
type: "Line" | "Block"
value: string
start: number
end: number
loc?: SourceLocation
range?: [number, number]
}
export class Token {
type: TokenType
start: number
end: number
loc?: SourceLocation
range?: [number, number]
}
export const version: string
================================================
FILE: acorn/src/bin/acorn.js
================================================
import {basename} from "path"
import {readFileSync as readFile} from "fs"
import * as acorn from "acorn"
let inputFilePaths = [], forceFileName = false, fileMode = false, silent = false, compact = false, tokenize = false
const options = {}
function help(status) {
const print = (status === 0) ? console.log : console.error
print("usage: " + basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]")
print(" [--tokenize] [--locations] [--allow-hash-bang] [--allow-await-outside-function] [--compact] [--silent] [--module] [--help] [--] [<infile>...]")
process.exit(status)
}
for (let i = 2; i < process.argv.length; ++i) {
const arg = process.argv[i]
if (arg[0] !== "-" || arg === "-") inputFilePaths.push(arg)
else if (arg === "--") {
inputFilePaths.push(...process.argv.slice(i + 1))
forceFileName = true
break
} else if (arg === "--locations") options.locations = true
else if (arg === "--allow-hash-bang") options.allowHashBang = true
else if (arg === "--allow-await-outside-function") options.allowAwaitOutsideFunction = true
else if (arg === "--silent") silent = true
else if (arg === "--compact") compact = true
else if (arg === "--help") help(0)
else if (arg === "--tokenize") tokenize = true
else if (arg === "--module") options.sourceType = "module"
else {
let match = arg.match(/^--ecma(\d+)$/)
if (match)
options.ecmaVersion = +match[1]
else
help(1)
}
}
function run(codeList) {
let result = [], fileIdx = 0
try {
codeList.forEach((code, idx) => {
fileIdx = idx
if (!tokenize) {
result = acorn.parse(code, options)
options.program = result
} else {
let tokenizer = acorn.tokenizer(code, options), token
do {
token = tokenizer.getToken()
result.push(token)
} while (token.type !== acorn.tokTypes.eof)
}
})
} catch (e) {
console.error(fileMode ? e.message.replace(/\(\d+:\d+\)$/, m => m.slice(0, 1) + inputFilePaths[fileIdx] + " " + m.slice(1)) : e.message)
process.exit(1)
}
if (!silent) console.log(JSON.stringify(result, (_, value) => typeof value === "bigint" ? null : value, compact ? null : 2))
}
if (fileMode = inputFilePaths.length && (forceFileName || !inputFilePaths.includes("-") || inputFilePaths.length !== 1)) {
run(inputFilePaths.map(path => readFile(path, "utf8")))
} else {
let code = ""
process.stdin.resume()
process.stdin.on("data", chunk => code += chunk)
process.stdin.on("end", () => run([code]))
}
================================================
FILE: acorn/src/expression.js
================================================
// A recursive descent parser operates by defining functions for all
// syntactic elements, and recursively calling those, each function
// advancing the input stream and returning an AST node. Precedence
// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
// instead of `(!x)[1]` is handled by the fact that the parser
// function that parses unary prefix operators is called first, and
// in turn calls the function that parses `[]` subscripts — that
// way, it'll receive the node for `x[1]` already parsed, and wraps
// *that* in the unary operator node.
//
// Acorn uses an [operator precedence parser][opp] to handle binary
// operator precedence, because it is much more compact than using
// the technique outlined above, which uses different, nesting
// functions to specify precedence, for all of the ten binary
// precedence levels that JavaScript defines.
//
// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
import {types as tt} from "./tokentype.js"
import {types as tokenCtxTypes} from "./tokencontext.js"
import {Parser} from "./state.js"
import {DestructuringErrors} from "./parseutil.js"
import {lineBreak} from "./whitespace.js"
import {functionFlags, SCOPE_ARROW, SCOPE_SUPER, SCOPE_DIRECT_SUPER, BIND_OUTSIDE, BIND_VAR, SCOPE_VAR} from "./scopeflags.js"
const pp = Parser.prototype
// Check if property name clashes with already added.
// Object/class getters and setters are not allowed to clash —
// either with each other or with an init property — and in
// strict mode, init properties are also not allowed to be repeated.
pp.checkPropClash = function(prop, propHash, refDestructuringErrors) {
if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement")
return
if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand))
return
let {key} = prop, name
switch (key.type) {
case "Identifier": name = key.name; break
case "Literal": name = String(key.value); break
default: return
}
let {kind} = prop
if (this.options.ecmaVersion >= 6) {
if (name === "__proto__" && kind === "init") {
if (propHash.proto) {
if (refDestructuringErrors) {
if (refDestructuringErrors.doubleProto < 0) {
refDestructuringErrors.doubleProto = key.start
}
} else {
this.raiseRecoverable(key.start, "Redefinition of __proto__ property")
}
}
propHash.proto = true
}
return
}
name = "$" + name
let other = propHash[name]
if (other) {
let redefinition
if (kind === "init") {
redefinition = this.strict && other.init || other.get || other.set
} else {
redefinition = other.init || other[kind]
}
if (redefinition)
this.raiseRecoverable(key.start, "Redefinition of property")
} else {
other = propHash[name] = {
init: false,
get: false,
set: false
}
}
other[kind] = true
}
// ### Expression parsing
// These nest, from the most general expression type at the top to
// 'atomic', nondivisible expression types at the bottom. Most of
// the functions will simply let the function(s) below them parse,
// and, *if* the syntactic construct they handle is present, wrap
// the AST node that the inner parser gave them in another node.
// Parse a full expression. The optional arguments are used to
// forbid the `in` operator (in for loops initalization expressions)
// and provide reference for storing '=' operator inside shorthand
// property assignment in contexts where both object expression
// and object pattern might appear (so it's possible to raise
// delayed syntax error at correct position).
pp.parseExpression = function(forInit, refDestructuringErrors) {
let startPos = this.start, startLoc = this.startLoc
let expr = this.parseMaybeAssign(forInit, refDestructuringErrors)
if (this.type === tt.comma) {
let node = this.startNodeAt(startPos, startLoc)
node.expressions = [expr]
while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors))
return this.finishNode(node, "SequenceExpression")
}
return expr
}
// Parse an assignment expression. This includes applications of
// operators like `+=`.
pp.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
if (this.isContextual("yield")) {
if (this.inGenerator) return this.parseYield(forInit)
// The tokenizer will assume an expression is allowed after
// `yield`, but this isn't that kind of yield
else this.exprAllowed = false
}
let ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1
if (refDestructuringErrors) {
oldParenAssign = refDestructuringErrors.parenthesizedAssign
oldTrailingComma = refDestructuringErrors.trailingComma
oldDoubleProto = refDestructuringErrors.doubleProto
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1
} else {
refDestructuringErrors = new DestructuringErrors
ownDestructuringErrors = true
}
let startPos = this.start, startLoc = this.startLoc
if (this.type === tt.parenL || this.type === tt.name) {
this.potentialArrowAt = this.start
this.potentialArrowInForAwait = forInit === "await"
}
let left = this.parseMaybeConditional(forInit, refDestructuringErrors)
if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
if (this.type.isAssign) {
let node = this.startNodeAt(startPos, startLoc)
node.operator = this.value
if (this.type === tt.eq)
left = this.toAssignable(left, false, refDestructuringErrors)
if (!ownDestructuringErrors) {
refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1
}
if (refDestructuringErrors.shorthandAssign >= left.start)
refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly
if (this.type === tt.eq)
this.checkLValPattern(left)
else
this.checkLValSimple(left)
node.left = left
this.next()
node.right = this.parseMaybeAssign(forInit)
if (oldDoubleProto > -1) refDestructuringErrors.doubleProto = oldDoubleProto
return this.finishNode(node, "AssignmentExpression")
} else {
if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true)
}
if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign
if (oldTrailingComma > -1) refDestructuringErrors.trailingComma = oldTrailingComma
return left
}
// Parse a ternary conditional (`?:`) operator.
pp.parseMaybeConditional = function(forInit, refDestructuringErrors) {
let startPos = this.start, startLoc = this.startLoc
let expr = this.parseExprOps(forInit, refDestructuringErrors)
if (this.checkExpressionErrors(refDestructuringErrors)) return expr
if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(tt.question)) {
let node = this.startNodeAt(startPos, startLoc)
node.test = expr
node.consequent = this.parseMaybeAssign()
this.expect(tt.colon)
node.alternate = this.parseMaybeAssign(forInit)
return this.finishNode(node, "ConditionalExpression")
}
return expr
}
// Start the precedence parser.
pp.parseExprOps = function(forInit, refDestructuringErrors) {
let startPos = this.start, startLoc = this.startLoc
let expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit)
if (this.checkExpressionErrors(refDestructuringErrors)) return expr
return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit)
}
// Parse binary operators with the operator precedence parsing
// algorithm. `left` is the left-hand side of the operator.
// `minPrec` provides context that allows the function to stop and
// defer further parser to one of its callers when it encounters an
// operator that has a lower precedence than the set it is parsing.
pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) {
let prec = this.type.binop
if (prec != null && (!forInit || this.type !== tt._in)) {
if (prec > minPrec) {
let logical = this.type === tt.logicalOR || this.type === tt.logicalAND
let coalesce = this.type === tt.coalesce
if (coalesce) {
// Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.
// In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.
prec = tt.logicalAND.binop
}
let op = this.value
this.next()
let startPos = this.start, startLoc = this.startLoc
let right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit)
let node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce)
if ((logical && this.type === tt.coalesce) || (coalesce && (this.type === tt.logicalOR || this.type === tt.logicalAND))) {
this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses")
}
return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit)
}
}
return left
}
pp.buildBinary = function(startPos, startLoc, left, right, op, logical) {
if (right.type === "PrivateIdentifier") this.raise(right.start, "Private identifier can only be left side of binary expression")
let node = this.startNodeAt(startPos, startLoc)
node.left = left
node.operator = op
node.right = right
return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression")
}
// Parse unary operators, both prefix and postfix.
pp.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) {
let startPos = this.start, startLoc = this.startLoc, expr
if (this.isContextual("await") && this.canAwait) {
expr = this.parseAwait(forInit)
sawUnary = true
} else if (this.type.prefix) {
let node = this.startNode(), update = this.type === tt.incDec
node.operator = this.value
node.prefix = true
this.next()
node.argument = this.parseMaybeUnary(null, true, update, forInit)
this.checkExpressionErrors(refDestructuringErrors, true)
if (update) this.checkLValSimple(node.argument)
else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument))
this.raiseRecoverable(node.start, "Deleting local variable in strict mode")
else if (node.operator === "delete" && isPrivateFieldAccess(node.argument))
this.raiseRecoverable(node.start, "Private fields can not be deleted")
else sawUnary = true
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
} else if (!sawUnary && this.type === tt.privateId) {
if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) this.unexpected()
expr = this.parsePrivateIdent()
// only could be private fields in 'in', such as #x in obj
if (this.type !== tt._in) this.unexpected()
} else {
expr = this.parseExprSubscripts(refDestructuringErrors, forInit)
if (this.checkExpressionErrors(refDestructuringErrors)) return expr
while (this.type.postfix && !this.canInsertSemicolon()) {
let node = this.startNodeAt(startPos, startLoc)
node.operator = this.value
node.prefix = false
node.argument = expr
this.checkLValSimple(expr)
this.next()
expr = this.finishNode(node, "UpdateExpression")
}
}
if (!incDec && this.eat(tt.starstar)) {
if (sawUnary)
this.unexpected(this.lastTokStart)
else
return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false)
} else {
return expr
}
}
function isLocalVariableAccess(node) {
return (
node.type === "Identifier" ||
node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression)
)
}
function isPrivateFieldAccess(node) {
return (
node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" ||
node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) ||
node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression)
)
}
// Parse call, dot, and `[]`-subscript expressions.
pp.parseExprSubscripts = function(refDestructuringErrors, forInit) {
let startPos = this.start, startLoc = this.startLoc
let expr = this.parseExprAtom(refDestructuringErrors, forInit)
if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")")
return expr
let result = this.parseSubscripts(expr, startPos, startLoc, false, forInit)
if (refDestructuringErrors && result.type === "MemberExpression") {
if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1
if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1
if (refDestructuringErrors.trailingComma >= result.start) refDestructuringErrors.trailingComma = -1
}
return result
}
pp.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) {
let maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" &&
this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 &&
this.potentialArrowAt === base.start
let optionalChained = false
while (true) {
let element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit)
if (element.optional) optionalChained = true
if (element === base || element.type === "ArrowFunctionExpression") {
if (optionalChained) {
const chainNode = this.startNodeAt(startPos, startLoc)
chainNode.expression = element
element = this.finishNode(chainNode, "ChainExpression")
}
return element
}
base = element
}
}
pp.shouldParseAsyncArrow = function() {
return !this.canInsertSemicolon() && this.eat(tt.arrow)
}
pp.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) {
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit)
}
pp.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) {
let optionalSupported = this.options.ecmaVersion >= 11
let optional = optionalSupported && this.eat(tt.questionDot)
if (noCalls && optional) this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions")
let computed = this.eat(tt.bracketL)
if (computed || (optional && this.type !== tt.parenL && this.type !== tt.backQuote) || this.eat(tt.dot)) {
let node = this.startNodeAt(startPos, startLoc)
node.object = base
if (computed) {
node.property = this.parseExpression()
this.expect(tt.bracketR)
} else if (this.type === tt.privateId && base.type !== "Super") {
node.property = this.parsePrivateIdent()
} else {
node.property = this.parseIdent(this.options.allowReserved !== "never")
}
node.computed = !!computed
if (optionalSupported) {
node.optional = optional
}
base = this.finishNode(node, "MemberExpression")
} else if (!noCalls && this.eat(tt.parenL)) {
let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos
this.yieldPos = 0
this.awaitPos = 0
this.awaitIdentPos = 0
let exprList = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors)
if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) {
this.checkPatternErrors(refDestructuringErrors, false)
this.checkYieldAwaitInDefaultParams()
if (this.awaitIdentPos > 0)
this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function")
this.yieldPos = oldYieldPos
this.awaitPos = oldAwaitPos
this.awaitIdentPos = oldAwaitIdentPos
return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit)
}
this.checkExpressionErrors(refDestructuringErrors, true)
this.yieldPos = oldYieldPos || this.yieldPos
this.awaitPos = oldAwaitPos || this.awaitPos
this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos
let node = this.startNodeAt(startPos, startLoc)
node.callee = base
node.arguments = exprList
if (optionalSupported) {
node.optional = optional
}
base = this.finishNode(node, "CallExpression")
} else if (this.type === tt.backQuote) {
if (optional || optionalChained) {
this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions")
}
let node = this.startNodeAt(startPos, startLoc)
node.tag = base
node.quasi = this.parseTemplate({isTagged: true})
base = this.finishNode(node, "TaggedTemplateExpression")
}
return base
}
// Parse an atomic expression — either a single token that is an
// expression, an expression started by a keyword like `function` or
// `new`, or an expression wrapped in punctuation like `()`, `[]`,
// or `{}`.
pp.parseExprAtom = function(refDestructuringErrors, forInit, forNew) {
// If a division operator appears in an expression position, the
// tokenizer got confused, and we force it to read a regexp instead.
if (this.type === tt.slash) this.readRegexp()
let node, canBeArrow = this.potentialArrowAt === this.start
switch (this.type) {
case tt._super:
if (!this.allowSuper)
this.raise(this.start, "'super' keyword outside a method")
node = this.startNode()
this.next()
if (this.type === tt.parenL && !this.allowDirectSuper)
this.raise(node.start, "super() call outside constructor of a subclass")
// The `super` keyword can appear at below:
// SuperProperty:
// super [ Expression ]
// super . IdentifierName
// SuperCall:
// super ( Arguments )
if (this.type !== tt.dot && this.type !== tt.bracketL && this.type !== tt.parenL)
this.unexpected()
return this.finishNode(node, "Super")
case tt._this:
node = this.startNode()
this.next()
return this.finishNode(node, "ThisExpression")
case tt.name:
let startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc
let id = this.parseIdent(false)
if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function)) {
this.overrideContext(tokenCtxTypes.f_expr)
return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit)
}
if (canBeArrow && !this.canInsertSemicolon()) {
if (this.eat(tt.arrow))
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit)
if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name && !containsEsc &&
(!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) {
id = this.parseIdent(false)
if (this.canInsertSemicolon() || !this.eat(tt.arrow))
this.unexpected()
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit)
}
}
return id
case tt.regexp:
let value = this.value
node = this.parseLiteral(value.value)
node.regex = {pattern: value.pattern, flags: value.flags}
return node
case tt.num: case tt.string:
return this.parseLiteral(this.value)
case tt._null: case tt._true: case tt._false:
node = this.startNode()
node.value = this.type === tt._null ? null : this.type === tt._true
node.raw = this.type.keyword
this.next()
return this.finishNode(node, "Literal")
case tt.parenL:
let start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit)
if (refDestructuringErrors) {
if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr))
refDestructuringErrors.parenthesizedAssign = start
if (refDestructuringErrors.parenthesizedBind < 0)
refDestructuringErrors.parenthesizedBind = start
}
return expr
case tt.bracketL:
node = this.startNode()
this.next()
node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors)
return this.finishNode(node, "ArrayExpression")
case tt.braceL:
this.overrideContext(tokenCtxTypes.b_expr)
return this.parseObj(false, refDestructuringErrors)
case tt._function:
node = this.startNode()
this.next()
return this.parseFunction(node, 0)
case tt._class:
return this.parseClass(this.startNode(), false)
case tt._new:
return this.parseNew()
case tt.backQuote:
return this.parseTemplate()
case tt._import:
if (this.options.ecmaVersion >= 11) {
return this.parseExprImport(forNew)
} else {
return this.unexpected()
}
default:
return this.parseExprAtomDefault()
}
}
pp.parseExprAtomDefault = function() {
this.unexpected()
}
pp.parseExprImport = function(forNew) {
const node = this.startNode()
// Consume `import` as an identifier for `import.meta`.
// Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword import")
this.next()
if (this.type === tt.parenL && !forNew) {
return this.parseDynamicImport(node)
} else if (this.type === tt.dot) {
let meta = this.startNodeAt(node.start, node.loc && node.loc.start)
meta.name = "import"
node.meta = this.finishNode(meta, "Identifier")
return this.parseImportMeta(node)
} else {
this.unexpected()
}
}
pp.parseDynamicImport = function(node) {
this.next() // skip `(`
// Parse node.source.
node.source = this.parseMaybeAssign()
if (this.options.ecmaVersion >= 16) {
if (!this.eat(tt.parenR)) {
this.expect(tt.comma)
if (!this.afterTrailingComma(tt.parenR)) {
node.options = this.parseMaybeAssign()
if (!this.eat(tt.parenR)) {
this.expect(tt.comma)
if (!this.afterTrailingComma(tt.parenR)) {
this.unexpected()
}
}
} else {
node.options = null
}
} else {
node.options = null
}
} else {
// Verify ending.
if (!this.eat(tt.parenR)) {
const errorPos = this.start
if (this.eat(tt.comma) && this.eat(tt.parenR)) {
this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()")
} else {
this.unexpected(errorPos)
}
}
}
return this.finishNode(node, "ImportExpression")
}
pp.parseImportMeta = function(node) {
this.next() // skip `.`
const containsEsc = this.containsEsc
node.property = this.parseIdent(true)
if (node.property.name !== "meta")
this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'")
if (containsEsc)
this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters")
if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere)
this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module")
return this.finishNode(node, "MetaProperty")
}
pp.parseLiteral = function(value) {
let node = this.startNode()
node.value = value
node.raw = this.input.slice(this.start, this.end)
if (node.raw.charCodeAt(node.raw.length - 1) === 110)
node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, "")
this.next()
return this.finishNode(node, "Literal")
}
pp.parseParenExpression = function() {
this.expect(tt.parenL)
let val = this.parseExpression()
this.expect(tt.parenR)
return val
}
pp.shouldParseArrow = function(exprList) {
return !this.canInsertSemicolon()
}
pp.parseParenAndDistinguishExpression = function(canBeArrow, forInit) {
let startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8
if (this.options.ecmaVersion >= 6) {
this.next()
let innerStartPos = this.start, innerStartLoc = this.startLoc
let exprList = [], first = true, lastIsComma = false
let refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart
this.yieldPos = 0
this.awaitPos = 0
// Do not save awaitIdentPos to allow checking awaits nested in parameters
while (this.type !== tt.parenR) {
first ? first = false : this.expect(tt.comma)
if (allowTrailingComma && this.afterTrailingComma(tt.parenR, true)) {
lastIsComma = true
break
} else if (this.type === tt.ellipsis) {
spreadStart = this.start
exprList.push(this.parseParenItem(this.parseRestBinding()))
if (this.type === tt.comma) {
this.raiseRecoverable(
this.start,
"Comma is not permitted after the rest element"
)
}
break
} else {
exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem))
}
}
let innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc
this.expect(tt.parenR)
if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(tt.arrow)) {
this.checkPatternErrors(refDestructuringErrors, false)
this.checkYieldAwaitInDefaultParams()
this.yieldPos = oldYieldPos
this.awaitPos = oldAwaitPos
return this.parseParenArrowList(startPos, startLoc, exprList, forInit)
}
if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart)
if (spreadStart) this.unexpected(spreadStart)
this.checkExpressionErrors(refDestructuringErrors, true)
this.yieldPos = oldYieldPos || this.yieldPos
this.awaitPos = oldAwaitPos || this.awaitPos
if (exprList.length > 1) {
val = this.startNodeAt(innerStartPos, innerStartLoc)
val.expressions = exprList
this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
} else {
val = exprList[0]
}
} else {
val = this.parseParenExpression()
}
if (this.options.preserveParens) {
let par = this.startNodeAt(startPos, startLoc)
par.expression = val
return this.finishNode(par, "ParenthesizedExpression")
} else {
return val
}
}
pp.parseParenItem = function(item) {
return item
}
pp.parseParenArrowList = function(startPos, startLoc, exprList, forInit) {
return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit)
}
// New's precedence is slightly tricky. It must allow its argument to
// be a `[]` or dot subscript expression, but not a call — at least,
// not without wrapping it in parentheses. Thus, it uses the noCalls
// argument to parseSubscripts to prevent it from consuming the
// argument list.
const empty = []
pp.parseNew = function() {
if (this.containsEsc) this.raiseRecoverable(this.start, "Escape sequence in keyword new")
let node = this.startNode()
this.next()
if (this.options.ecmaVersion >= 6 && this.type === tt.dot) {
let meta = this.startNodeAt(node.start, node.loc && node.loc.start)
meta.name = "new"
node.meta = this.finishNode(meta, "Identifier")
this.next()
let containsEsc = this.containsEsc
node.property = this.parseIdent(true)
if (node.property.name !== "target")
this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'")
if (containsEsc)
this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters")
if (!this.allowNewDotTarget)
this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block")
return this.finishNode(node, "MetaProperty")
}
let startPos = this.start, startLoc = this.startLoc
node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false)
if (node.callee.type === "Super")
this.raiseRecoverable(startPos, "Invalid use of 'super'")
if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false)
else node.arguments = empty
return this.finishNode(node, "NewExpression")
}
// Parse template expression.
pp.parseTemplateElement = function({isTagged}) {
let elem = this.startNode()
if (this.type === tt.invalidTemplate) {
if (!isTagged) {
this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal")
}
elem.value = {
raw: this.value.replace(/\r\n?/g, "\n"),
cooked: null
}
} else {
elem.value = {
raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
cooked: this.value
}
}
this.next()
elem.tail = this.type === tt.backQuote
return this.finishNode(elem, "TemplateElement")
}
pp.parseTemplate = function({isTagged = false} = {}) {
let node = this.startNode()
this.next()
node.expressions = []
let curElt = this.parseTemplateElement({isTagged})
node.quasis = [curElt]
while (!curElt.tail) {
if (this.type === tt.eof) this.raise(this.pos, "Unterminated template literal")
this.expect(tt.dollarBraceL)
node.expressions.push(this.parseExpression())
this.expect(tt.braceR)
node.quasis.push(curElt = this.parseTemplateElement({isTagged}))
}
this.next()
return this.finishNode(node, "TemplateLiteral")
}
pp.isAsyncProp = function(prop) {
return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" &&
(this.type === tt.name || this.type === tt.num || this.type === tt.string || this.type === tt.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === tt.star)) &&
!lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
}
// Parse an object literal or binding pattern.
pp.parseObj = function(isPattern, refDestructuringErrors) {
let node = this.startNode(), first = true, propHash = {}
node.properties = []
this.next()
while (!this.eat(tt.braceR)) {
if (!first) {
this.expect(tt.comma)
if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(tt.braceR)) break
} else first = false
const prop = this.parseProperty(isPattern, refDestructuringErrors)
if (!isPattern) this.checkPropClash(prop, propHash, refDestructuringErrors)
node.properties.push(prop)
}
return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
}
pp.parseProperty = function(isPattern, refDestructuringErrors) {
let prop = this.startNode(), isGenerator, isAsync, startPos, startLoc
if (this.options.ecmaVersion >= 9 && this.eat(tt.ellipsis)) {
if (isPattern) {
prop.argument = this.parseIdent(false)
if (this.type === tt.comma) {
this.raiseRecoverable(this.start, "Comma is not permitted after the rest element")
}
return this.finishNode(prop, "RestElement")
}
// Parse argument.
prop.argument = this.parseMaybeAssign(false, refDestructuringErrors)
// To disallow trailing comma via `this.toAssignable()`.
if (this.type === tt.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) {
refDestructuringErrors.trailingComma = this.start
}
// Finish
return this.finishNode(prop, "SpreadElement")
}
if (this.options.ecmaVersion >= 6) {
prop.method = false
prop.shorthand = false
if (isPattern || refDestructuringErrors) {
startPos = this.start
startLoc = this.startLoc
}
if (!isPattern)
isGenerator = this.eat(tt.star)
}
let containsEsc = this.containsEsc
this.parsePropertyName(prop)
if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) {
isAsync = true
isGenerator = this.options.ecmaVersion >= 9 && this.eat(tt.star)
this.parsePropertyName(prop)
} else {
isAsync = false
}
this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc)
return this.finishNode(prop, "Property")
}
pp.parseGetterSetter = function(prop) {
const kind = prop.key.name
this.parsePropertyName(prop)
prop.value = this.parseMethod(false)
prop.kind = kind
let paramCount = prop.kind === "get" ? 0 : 1
if (prop.value.params.length !== paramCount) {
let start = prop.value.start
if (prop.kind === "get")
this.raiseRecoverable(start, "getter should have no params")
else
this.raiseRecoverable(start, "setter should have exactly one param")
} else {
if (prop.kind === "set" && prop.value.params[0].type === "RestElement")
this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params")
}
}
pp.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) {
if ((isGenerator || isAsync) && this.type === tt.colon)
this.unexpected()
if (this.eat(tt.colon)) {
prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors)
prop.kind = "init"
} else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
if (isPattern) this.unexpected()
prop.method = true
prop.value = this.parseMethod(isGenerator, isAsync)
prop.kind = "init"
} else if (!isPattern && !containsEsc &&
this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
(prop.key.name === "get" || prop.key.name === "set") &&
(this.type !== tt.comma && this.type !== tt.braceR && this.type !== tt.eq)) {
if (isGenerator || isAsync) this.unexpected()
this.parseGetterSetter(prop)
} else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
if (isGenerator || isAsync) this.unexpected()
this.checkUnreserved(prop.key)
if (prop.key.name === "await" && !this.awaitIdentPos)
this.awaitIdentPos = startPos
if (isPattern) {
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))
} else if (this.type === tt.eq && refDestructuringErrors) {
if (refDestructuringErrors.shorthandAssign < 0)
refDestructuringErrors.shorthandAssign = this.start
prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key))
} else {
prop.value = this.copyNode(prop.key)
}
prop.kind = "init"
prop.shorthand = true
} else this.unexpected()
}
pp.parsePropertyName = function(prop) {
if (this.options.ecmaVersion >= 6) {
if (this.eat(tt.bracketL)) {
prop.computed = true
prop.key = this.parseMaybeAssign()
this.expect(tt.bracketR)
return prop.key
} else {
prop.computed = false
}
}
return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never")
}
// Initialize empty function node.
pp.initFunction = function(node) {
node.id = null
if (this.options.ecmaVersion >= 6) node.generator = node.expression = false
if (this.options.ecmaVersion >= 8) node.async = false
}
// Parse object or class method.
pp.parseMethod = function(isGenerator, isAsync, allowDirectSuper) {
let node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos
this.initFunction(node)
if (this.options.ecmaVersion >= 6)
node.generator = isGenerator
if (this.options.ecmaVersion >= 8)
node.async = !!isAsync
this.yieldPos = 0
this.awaitPos = 0
this.awaitIdentPos = 0
this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0))
this.expect(tt.parenL)
node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8)
this.checkYieldAwaitInDefaultParams()
this.parseFunctionBody(node, false, true, false)
this.yieldPos = oldYieldPos
this.awaitPos = oldAwaitPos
this.awaitIdentPos = oldAwaitIdentPos
return this.finishNode(node, "FunctionExpression")
}
// Parse arrow function expression with given parameters.
pp.parseArrowExpression = function(node, params, isAsync, forInit) {
let oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos
this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW)
this.initFunction(node)
if (this.options.ecmaVersion >= 8) node.async = !!isAsync
this.yieldPos = 0
this.awaitPos = 0
this.awaitIdentPos = 0
node.params = this.toAssignableList(params, true)
this.parseFunctionBody(node, true, false, forInit)
this.yieldPos = oldYieldPos
this.awaitPos = oldAwaitPos
this.awaitIdentPos = oldAwaitIdentPos
return this.finishNode(node, "ArrowFunctionExpression")
}
// Parse function body and check parameters.
pp.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) {
let isExpression = isArrowFunction && this.type !== tt.braceL
let oldStrict = this.strict, useStrict = false
if (isExpression) {
node.body = this.parseMaybeAssign(forInit)
node.expression = true
this.checkParams(node, false)
} else {
let nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params)
if (!oldStrict || nonSimple) {
useStrict = this.strictDirective(this.end)
// If this is a strict mode function, verify that argument names
// are not repeated, and it does not try to bind the words `eval`
// or `arguments`.
if (useStrict && nonSimple)
this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list")
}
// Start a new scope with regard to labels and the `inFunction`
// flag (restore them to their old value afterwards).
let oldLabels = this.labels
this.labels = []
if (useStrict) this.strict = true
// Add the params to varDeclaredNames to ensure that an error is thrown
// if a let/const declaration in the function clashes with one of the params.
this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params))
// Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'
if (this.strict && node.id) this.checkLValSimple(node.id, BIND_OUTSIDE)
node.body = this.parseBlock(false, undefined, useStrict && !oldStrict)
node.expression = false
this.adaptDirectivePrologue(node.body.body)
this.labels = oldLabels
}
this.exitScope()
}
pp.isSimpleParamList = function(params) {
for (let param of params)
if (param.type !== "Identifier") return false
return true
}
// Checks function params for various disallowed patterns such as using "eval"
// or "arguments" and duplicate parameters.
pp.checkParams = function(node, allowDuplicates) {
let nameHash = Object.create(null)
for (let param of node.params)
this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash)
}
// Parses a comma-separated list of expressions, and returns them as
// an array. `close` is the token type that ends the list, and
// `allowEmpty` can be turned on to allow subsequent commas with
// nothing in between them to be parsed as `null` (which is needed
// for array literals).
pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) {
let elts = [], first = true
while (!this.eat(close)) {
if (!first) {
this.expect(tt.comma)
if (allowTrailingComma && this.afterTrailingComma(close)) break
} else first = false
let elt
if (allowEmpty && this.type === tt.comma)
elt = null
else if (this.type === tt.ellipsis) {
elt = this.parseSpread(refDestructuringErrors)
if (refDestructuringErrors && this.type === tt.comma && refDestructuringErrors.trailingComma < 0)
refDestructuringErrors.trailingComma = this.start
} else {
elt = this.parseMaybeAssign(false, refDestructuringErrors)
}
elts.push(elt)
}
return elts
}
pp.checkUnreserved = function({start, end, name}) {
if (this.inGenerator && name === "yield")
this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator")
if (this.inAsync && name === "await")
this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function")
if (!(this.currentThisScope().flags & SCOPE_VAR) && name === "arguments")
this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer")
if (this.inClassStaticBlock && (name === "arguments" || name === "await"))
this.raise(start, `Cannot use ${name} in class static initialization block`)
if (this.keywords.test(name))
this.raise(start, `Unexpected keyword '${name}'`)
if (this.options.ecmaVersion < 6 &&
this.input.slice(start, end).indexOf("\\") !== -1) return
const re = this.strict ? this.reservedWordsStrict : this.reservedWords
if (re.test(name)) {
if (!this.inAsync && name === "await")
this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function")
this.raiseRecoverable(start, `The keyword '${name}' is reserved`)
}
}
// Parse the next token as an identifier. If `liberal` is true (used
// when parsing properties), it will also convert keywords into
// identifiers.
pp.parseIdent = function(liberal) {
let node = this.parseIdentNode()
this.next(!!liberal)
this.finishNode(node, "Identifier")
if (!liberal) {
this.checkUnreserved(node)
if (node.name === "await" && !this.awaitIdentPos)
this.awaitIdentPos = node.start
}
return node
}
pp.parseIdentNode = function() {
let node = this.startNode()
if (this.type === tt.name) {
node.name = this.value
} else if (this.type.keyword) {
node.name = this.type.keyword
// To fix https://github.com/acornjs/acorn/issues/575
// `class` and `function` keywords push new context into this.context.
// But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name.
// If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword
if ((node.name === "class" || node.name === "function") &&
(this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) {
this.context.pop()
}
this.type = tt.name
} else {
this.unexpected()
}
return node
}
pp.parsePrivateIdent = function() {
const node = this.startNode()
if (this.type === tt.privateId) {
node.name = this.value
} else {
this.unexpected()
}
this.next()
this.finishNode(node, "PrivateIdentifier")
// For validating existence
if (this.options.checkPrivateFields) {
if (this.privateNameStack.length === 0) {
this.raise(node.start, `Private field '#${node.name}' must be declared in an enclosing class`)
} else {
this.privateNameStack[this.privateNameStack.length - 1].used.push(node)
}
}
return node
}
// Parses yield expression inside generator.
pp.parseYield = function(forInit) {
if (!this.yieldPos) this.yieldPos = this.start
let node = this.startNode()
this.next()
if (this.type === tt.semi || this.canInsertSemicolon() || (this.type !== tt.star && !this.type.startsExpr)) {
node.delegate = false
node.argument = null
} else {
node.delegate = this.eat(tt.star)
node.argument = this.parseMaybeAssign(forInit)
}
return this.finishNode(node, "YieldExpression")
}
pp.parseAwait = function(forInit) {
if (!this.awaitPos) this.awaitPos = this.start
let node = this.startNode()
this.next()
node.argument = this.parseMaybeUnary(null, true, false, forInit)
return this.finishNode(node, "AwaitExpression")
}
================================================
FILE: acorn/src/generated/astralIdentifierCodes.js
================================================
// This file was generated. Do not modify manually!
export default [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 78, 5, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 199, 7, 137, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 55, 9, 266, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 233, 0, 3, 0, 8, 1, 6, 0, 475, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]
================================================
FILE: acorn/src/generated/astralIdentifierStartCodes.js
================================================
// This file was generated. Do not modify manually!
export default [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 7, 25, 39, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 5, 57, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 24, 43, 261, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 33, 24, 3, 24, 45, 74, 6, 0, 67, 12, 65, 1, 2, 0, 15, 4, 10, 7381, 42, 31, 98, 114, 8702, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 208, 30, 2, 2, 2, 1, 2, 6, 3, 4, 10, 1, 225, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4381, 3, 5773, 3, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 8489]
================================================
FILE: acorn/src/generated/nonASCIIidentifierChars.js
================================================
// This file was generated. Do not modify manually!
export default "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0897-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1add\u1ae0-\u1aeb\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"
================================================
FILE: acorn/src/generated/nonASCIIidentifierStartChars.js
================================================
// This file was generated. Do not modify manually!
export default "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088f\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5c\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdc-\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c8a\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7dc\ua7f1-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
================================================
FILE: acorn/src/generated/scriptValuesAddedInUnicode.js
================================================
// This file was generated by "bin/generate-unicode-script-values.js". Do not modify manually!
export default "Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz"
================================================
FILE: acorn/src/identifier.js
================================================
// These are a run-length and offset encoded representation of the
// >0xffff code points that are a valid part of identifiers. The
// offset starts at 0x10000, and each pair of numbers represents an
// offset to the next range, and then a size of the range.
import astralIdentifierCodes from "./generated/astralIdentifierCodes.js"
import astralIdentifierStartCodes from "./generated/astralIdentifierStartCodes.js"
// Big ugly regular expressions that match characters in the
// whitespace, identifier, and identifier-start categories. These
// are only applied when a character is found to actually have a
// code point above 128.
import nonASCIIidentifierChars from "./generated/nonASCIIidentifierChars.js"
import nonASCIIidentifierStartChars from "./generated/nonASCIIidentifierStartChars.js"
// Reserved word lists for various dialects of the language
export const reservedWords = {
3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",
5: "class enum extends super const export import",
6: "enum",
strict: "implements interface let package private protected public static yield",
strictBind: "eval arguments"
}
// And the keywords
const ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
export const keywords = {
5: ecma5AndLessKeywords,
"5module": ecma5AndLessKeywords + " export import",
6: ecma5AndLessKeywords + " const class extends export import super"
}
export const keywordRelationalOperator = /^in(stanceof)?$/
// ## Character categories
const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]")
// This has a complexity linear to the value of the code. The
// assumption is that looking up astral identifier characters is
// rare.
function isInAstralSet(code, set) {
let pos = 0x10000
for (let i = 0; i < set.length; i += 2) {
pos += set[i]
if (pos > code) return false
pos += set[i + 1]
if (pos >= code) return true
}
return false
}
// Test whether a given character code starts an identifier.
export function isIdentifierStart(code, astral) {
if (code < 65) return code === 36
if (code < 91) return true
if (code < 97) return code === 95
if (code < 123) return true
if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
if (astral === false) return false
return isInAstralSet(code, astralIdentifierStartCodes)
}
// Test whether a given character is part of an identifier.
export function isIdentifierChar(code, astral) {
if (code < 48) return code === 36
if (code < 58) return true
if (code < 65) return false
if (code < 91) return true
if (code < 97) return code === 95
if (code < 123) return true
if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
if (astral === false) return false
return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
}
================================================
FILE: acorn/src/index.js
================================================
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
//
// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
// various contributors and released under an MIT license.
//
// Git repositories for Acorn are available at
//
// http://marijnhaverbeke.nl/git/acorn
// https://github.com/acornjs/acorn.git
//
// Please use the [github bug tracker][ghbt] to report issues.
//
// [ghbt]: https://github.com/acornjs/acorn/issues
import {Parser} from "./state.js"
import "./parseutil.js"
import "./statement.js"
import "./lval.js"
import "./expression.js"
import "./location.js"
import "./scope.js"
import {defaultOptions} from "./options.js"
import {Position, SourceLocation, getLineInfo} from "./locutil.js"
import {Node} from "./node.js"
import {TokenType, types as tokTypes, keywords as keywordTypes} from "./tokentype.js"
import {TokContext, types as tokContexts} from "./tokencontext.js"
import {isIdentifierChar, isIdentifierStart} from "./identifier.js"
import {Token} from "./tokenize.js"
import {isNewLine, lineBreak, lineBreakG, nonASCIIwhitespace} from "./whitespace.js"
export const version = "8.16.0"
export {
Parser,
defaultOptions,
Position,
SourceLocation,
getLineInfo,
Node,
TokenType,
tokTypes,
keywordTypes,
TokContext,
tokContexts,
isIdentifierChar,
isIdentifierStart,
Token,
isNewLine,
lineBreak,
lineBreakG,
nonASCIIwhitespace
}
Parser.acorn = {
Parser,
version,
defaultOptions,
Position,
SourceLocation,
getLineInfo,
Node,
TokenType,
tokTypes,
keywordTypes,
TokContext,
tokContexts,
isIdentifierChar,
isIdentifierStart,
Token,
isNewLine,
lineBreak,
lineBreakG,
nonASCIIwhitespace
}
// The main exported interface (under `self.acorn` when in the
// browser) is a `parse` function that takes a code string and returns
// an abstract syntax tree as specified by the [ESTree spec][estree].
//
// [estree]: https://github.com/estree/estree
export function parse(input, options) {
return Parser.parse(input, options)
}
// This function tries to parse a single expression at a given
// offset in a string. Useful for parsing mixed-language formats
// that embed JavaScript expressions.
export function parseExpressionAt(input, pos, options) {
return Parser.parseExpressionAt(input, pos, options)
}
// Acorn is organized as a tokenizer and a recursive-descent parser.
// The `tokenizer` export provides an interface to the tokenizer.
export function tokenizer(input, options) {
return Parser.tokenizer(input, options)
}
================================================
FILE: acorn/src/location.js
================================================
import {Parser} from "./state.js"
import {Position, getLineInfo} from "./locutil.js"
const pp = Parser.prototype
// This function is used to raise exceptions on parse errors. It
// takes an offset integer (into the current `input`) to indicate
// the location of the error, attaches the position to the end
// of the error message, and then raises a `SyntaxError` with that
// message.
pp.raise = function(pos, message) {
let loc = getLineInfo(this.input, pos)
message += " (" + loc.line + ":" + loc.column + ")"
if (this.sourceFile) {
message += " in " + this.sourceFile
}
let err = new SyntaxError(message)
err.pos = pos; err.loc = loc; err.raisedAt = this.pos
throw err
}
pp.raiseRecoverable = pp.raise
pp.curPosition = function() {
if (this.options.locations) {
return new Position(this.curLine, this.pos - this.lineStart)
}
}
================================================
FILE: acorn/src/locutil.js
================================================
import {nextLineBreak} from "./whitespace.js"
// These are used when `options.locations` is on, for the
// `startLoc` and `endLoc` properties.
export class Position {
constructor(line, col) {
this.line = line
this.column = col
}
offset(n) {
return new Position(this.line, this.column + n)
}
}
export class SourceLocation {
constructor(p, start, end) {
this.start = start
this.end = end
if (p.sourceFile !== null) this.source = p.sourceFile
}
}
// The `getLineInfo` function is mostly useful when the
// `locations` option is off (for performance reasons) and you
// want to find the line/column position for a given character
// offset. `input` should be the code string that the offset refers
// into.
export function getLineInfo(input, offset) {
for (let line = 1, cur = 0;;) {
let nextBreak = nextLineBreak(input, cur, offset)
if (nextBreak < 0) return new Position(line, offset - cur)
++line
cur = nextBreak
}
}
================================================
FILE: acorn/src/lval.js
================================================
import {types as tt} from "./tokentype.js"
import {Parser} from "./state.js"
import {hasOwn} from "./util.js"
import {BIND_NONE, BIND_OUTSIDE, BIND_LEXICAL} from "./scopeflags.js"
const pp = Parser.prototype
// Convert existing expression atom to assignable pattern
// if possible.
pp.toAssignable = function(node, isBinding, refDestructuringErrors) {
if (this.options.ecmaVersion >= 6 && node) {
switch (node.type) {
case "Identifier":
if (this.inAsync && node.name === "await")
this.raise(node.start, "Cannot use 'await' as identifier inside an async function")
break
case "ObjectPattern":
case "ArrayPattern":
case "AssignmentPattern":
case "RestElement":
break
case "ObjectExpression":
node.type = "ObjectPattern"
if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)
for (let prop of node.properties) {
this.toAssignable(prop, isBinding)
// Early error:
// AssignmentRestProperty[Yield, Await] :
// `...` DestructuringAssignmentTarget[Yield, Await]
//
// It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|.
if (
prop.type === "RestElement" &&
(prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")
) {
this.raise(prop.argument.start, "Unexpected token")
}
}
break
case "Property":
// AssignmentProperty has type === "Property"
if (node.kind !== "init") this.raise(node.key.start, "Object pattern can't contain getter or setter")
this.toAssignable(node.value, isBinding)
break
case "ArrayExpression":
node.type = "ArrayPattern"
if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)
this.toAssignableList(node.elements, isBinding)
break
case "SpreadElement":
node.type = "RestElement"
this.toAssignable(node.argument, isBinding)
if (node.argument.type === "AssignmentPattern")
this.raise(node.argument.start, "Rest elements cannot have a default value")
break
case "AssignmentExpression":
if (node.operator !== "=") this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
node.type = "AssignmentPattern"
delete node.operator
this.toAssignable(node.left, isBinding)
break
case "ParenthesizedExpression":
this.toAssignable(node.expression, isBinding, refDestructuringErrors)
break
case "ChainExpression":
this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side")
break
case "MemberExpression":
if (!isBinding) break
default:
this.raise(node.start, "Assigning to rvalue")
}
} else if (refDestructuringErrors) this.checkPatternErrors(refDestructuringErrors, true)
return node
}
// Convert list of expression atoms to binding list.
pp.toAssignableList = function(exprList, isBinding) {
let end = exprList.length
for (let i = 0; i < end; i++) {
let elt = exprList[i]
if (elt) this.toAssignable(elt, isBinding)
}
if (end) {
let last = exprList[end - 1]
if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier")
this.unexpected(last.argument.start)
}
return exprList
}
// Parses spread element.
pp.parseSpread = function(refDestructuringErrors) {
let node = this.startNode()
this.next()
node.argument = this.parseMaybeAssign(false, refDestructuringErrors)
return this.finishNode(node, "SpreadElement")
}
pp.parseRestBinding = function() {
let node = this.startNode()
this.next()
// RestElement inside of a function parameter must be an identifier
if (this.options.ecmaVersion === 6 && this.type !== tt.name)
this.unexpected()
node.argument = this.parseBindingAtom()
return this.finishNode(node, "RestElement")
}
// Parses lvalue (assignable) atom.
pp.parseBindingAtom = function() {
if (this.options.ecmaVersion >= 6) {
switch (this.type) {
case tt.bracketL:
let node = this.startNode()
this.next()
node.elements = this.parseBindingList(tt.bracketR, true, true)
return this.finishNode(node, "ArrayPattern")
case tt.braceL:
return this.parseObj(true)
}
}
return this.parseIdent()
}
pp.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) {
let elts = [], first = true
while (!this.eat(close)) {
if (first) first = false
else this.expect(tt.comma)
if (allowEmpty && this.type === tt.comma) {
elts.push(null)
} else if (allowTrailingComma && this.afterTrailingComma(close)) {
break
} else if (this.type === tt.ellipsis) {
let rest = this.parseRestBinding()
this.parseBindingListItem(rest)
elts.push(rest)
if (this.type === tt.comma) this.raiseRecoverable(this.start, "Comma is not permitted after the rest element")
this.expect(close)
break
} else {
elts.push(this.parseAssignableListItem(allowModifiers))
}
}
return elts
}
pp.parseAssignableListItem = function(allowModifiers) {
let elem = this.parseMaybeDefault(this.start, this.startLoc)
this.parseBindingListItem(elem)
return elem
}
pp.parseBindingListItem = function(param) {
return param
}
// Parses assignment pattern around given atom if possible.
pp.parseMaybeDefault = function(startPos, startLoc, left) {
left = left || this.parseBindingAtom()
if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left
let node = this.startNodeAt(startPos, startLoc)
node.left = left
node.right = this.parseMaybeAssign()
return this.finishNode(node, "AssignmentPattern")
}
// The following three functions all verify that a node is an lvalue —
// something that can be bound, or assigned to. In order to do so, they perform
// a variety of checks:
//
// - Check that none of the bound/assigned-to identifiers are reserved words.
// - Record name declarations for bindings in the appropriate scope.
// - Check duplicate argument names, if checkClashes is set.
//
// If a complex binding pattern is encountered (e.g., object and array
// destructuring), the entire pattern is recursively checked.
//
// There are three versions of checkLVal*() appropriate for different
// circumstances:
//
// - checkLValSimple() shall be used if the syntactic construct supports
// nothing other than identifiers and member expressions. Parenthesized
// expressions are also correctly handled. This is generally appropriate for
// constructs for which the spec says
//
// > It is a Syntax Error if AssignmentTargetType of [the production] is not
// > simple.
//
// It is also appropriate for checking if an identifier is valid and not
// defined elsewhere, like import declarations or function/class identifiers.
//
// Examples where this is used include:
// a += …;
// import a from '…';
// where a is the node to be checked.
//
// - checkLValPattern() shall be used if the syntactic construct supports
// anything checkLValSimple() supports, as well as object and array
// destructuring patterns. This is generally appropriate for constructs for
// which the spec says
//
// > It is a Syntax Error if [the production] is neither an ObjectLiteral nor
// > an ArrayLiteral and AssignmentTargetType of [the production] is not
// > simple.
//
// Examples where this is used include:
// (a = …);
// const a = …;
// try { … } catch (a) { … }
// where a is the node to be checked.
//
// - checkLValInnerPattern() shall be used if the syntactic construct supports
// anything checkLValPattern() supports, as well as default assignment
// patterns, rest elements, and other constructs that may appear within an
// object or array destructuring pattern.
//
// As a special case, function parameters also use checkLValInnerPattern(),
// as they also support defaults and rest constructs.
//
// These functions deliberately support both assignment and binding constructs,
// as the logic for both is exceedingly similar. If the node is the target of
// an assignment, then bindingType should be set to BIND_NONE. Otherwise, it
// should be set to the appropriate BIND_* constant, like BIND_VAR or
// BIND_LEXICAL.
//
// If the function is called with a non-BIND_NONE bindingType, then
// additionally a checkClashes object may be specified to allow checking for
// duplicate argument names. checkClashes is ignored if the provided construct
// is an assignment (i.e., bindingType is BIND_NONE).
pp.checkLValSimple = function(expr, bindingType = BIND_NONE, checkClashes) {
const isBind = bindingType !== BIND_NONE
switch (expr.type) {
case "Identifier":
if (this.strict && this.reservedWordsStrictBind.test(expr.name))
this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
if (isBind) {
if (bindingType === BIND_LEXICAL && expr.name === "let")
this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name")
if (checkClashes) {
if (hasOwn(checkClashes, expr.name))
this.raiseRecoverable(expr.start, "Argument name clash")
checkClashes[expr.name] = true
}
if (bindingType !== BIND_OUTSIDE) this.declareName(expr.name, bindingType, expr.start)
}
break
case "ChainExpression":
this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side")
break
case "MemberExpression":
if (isBind) this.raiseRecoverable(expr.start, "Binding member expression")
break
case "ParenthesizedExpression":
if (isBind) this.raiseRecoverable(expr.start, "Binding parenthesized expression")
return this.checkLValSimple(expr.expression, bindingType, checkClashes)
default:
this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue")
}
}
pp.checkLValPattern = function(expr, bindingType = BIND_NONE, checkClashes) {
switch (expr.type) {
case "ObjectPattern":
for (let prop of expr.properties) {
this.checkLValInnerPattern(prop, bindingType, checkClashes)
}
break
case "ArrayPattern":
for (let elem of expr.elements) {
if (elem) this.checkLValInnerPattern(elem, bindingType, checkClashes)
}
break
default:
this.checkLValSimple(expr, bindingType, checkClashes)
}
}
pp.checkLValInnerPattern = function(expr, bindingType = BIND_NONE, checkClashes) {
switch (expr.type) {
case "Property":
// AssignmentProperty has type === "Property"
this.checkLValInnerPattern(expr.value, bindingType, checkClashes)
break
case "AssignmentPattern":
this.checkLValPattern(expr.left, bindingType, checkClashes)
break
case "RestElement":
this.checkLValPattern(expr.argument, bindingType, checkClashes)
break
default:
this.checkLValPattern(expr, bindingType, checkClashes)
}
}
================================================
FILE: acorn/src/node.js
================================================
import {Parser} from "./state.js"
import {SourceLocation} from "./locutil.js"
export class Node {
constructor(parser, pos, loc) {
this.type = ""
this.start = pos
this.end = 0
if (parser.options.locations)
this.loc = new SourceLocation(parser, loc)
if (parser.options.directSourceFile)
this.sourceFile = parser.options.directSourceFile
if (parser.options.ranges)
this.range = [pos, 0]
}
}
// Start an AST node, attaching a start offset.
const pp = Parser.prototype
pp.startNode = function() {
return new Node(this, this.start, this.startLoc)
}
pp.startNodeAt = function(pos, loc) {
return new Node(this, pos, loc)
}
// Finish an AST node, adding `type` and `end` properties.
function finishNodeAt(node, type, pos, loc) {
node.type = type
node.end = pos
if (this.options.locations)
node.loc.end = loc
if (this.options.ranges)
node.range[1] = pos
return node
}
pp.finishNode = function(node, type) {
return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc)
}
// Finish node at given position
pp.finishNodeAt = function(node, type, pos, loc) {
return finishNodeAt.call(this, node, type, pos, loc)
}
pp.copyNode = function(node) {
let newNode = new Node(this, node.start, this.startLoc)
for (let prop in node) newNode[prop] = node[prop]
return newNode
}
================================================
FILE: acorn/src/options.js
================================================
import {hasOwn, isArray} from "./util.js"
import {SourceLocation} from "./locutil.js"
// A second argument must be given to configure the parser process.
// These options are recognized (only `ecmaVersion` is required):
export const defaultOptions = {
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
// (the latest version the library supports). This influences
// support for strict mode, the set of reserved words, and support
// for new syntax features.
ecmaVersion: null,
// `sourceType` indicates the mode the code should be parsed in.
// Can be either `"script"`, `"module"` or `"commonjs"`. This influences global
// strict mode and parsing of `import` and `export` declarations.
sourceType: "script",
// `onInsertedSemicolon` can be a callback that will be called when
// a semicolon is automatically inserted. It will be passed the
// position of the inserted semicolon as an offset, and if
// `locations` is enabled, it is given the location as a `{line,
// column}` object as second argument.
onInsertedSemicolon: null,
// `onTrailingComma` is similar to `onInsertedSemicolon`, but for
// trailing commas.
onTrailingComma: null,
// By default, reserved words are only enforced if ecmaVersion >= 5.
// Set `allowReserved` to a boolean value to explicitly turn this on
// an off. When this option has the value "never", reserved words
// and keywords can also not be used as property names.
allowReserved: null,
// When enabled, a return at the top level is not considered an
// error.
allowReturnOutsideFunction: false,
// When enabled, import/export statements are not constrained to
// appearing at the top of the program, and an import.meta expression
// in a script isn't considered an error.
allowImportExportEverywhere: false,
// By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022.
// When enabled, await identifiers are allowed to appear at the top-level scope,
// but they are still not allowed in non-async functions.
allowAwaitOutsideFunction: null,
// When enabled, super identifiers are not constrained to
// appearing in methods and do not raise an error when they appear elsewhere.
allowSuperOutsideMethod: null,
// When enabled, hashbang directive in the beginning of file is
// allowed and treated as a line comment. Enabled by default when
// `ecmaVersion` >= 2023.
allowHashBang: false,
// By default, the parser will verify that private properties are
// only used in places where they are valid and have been declared.
// Set this to false to turn such checks off.
checkPrivateFields: true,
// When `locations` is on, `loc` properties holding objects with
// `start` and `end` properties in `{line, column}` form (with
// line being 1-based and column 0-based) will be attached to the
// nodes.
locations: false,
// A function can be passed as `onToken` option, which will
// cause Acorn to call that function with object in the same
// format as tokens returned from `tokenizer().getToken()`. Note
// that you are not allowed to call the parser from the
// callback—that will corrupt its internal state.
onToken: null,
// A function can be passed as `onComment` option, which will
// cause Acorn to call that function with `(block, text, start,
// end)` parameters whenever a comment is skipped. `block` is a
// boolean indicating whether this is a block (`/* */`) comment,
// `text` is the content of the comment, and `start` and `end` are
// character offsets that denote the start and end of the comment.
// When the `locations` option is on, two more parameters are
// passed, the full `{line, column}` locations of the start and
// end of the comments. Note that you are not allowed to call the
// parser from the callback—that will corrupt its internal state.
// When this option has an array as value, objects representing the
// comments are pushed to it.
onComment: null,
// Nodes have their start and end characters offsets recorded in
// `start` and `end` properties (directly on the node, rather than
// the `loc` object, which holds line/column data. To also add a
// [semi-standardized][range] `range` property holding a `[start,
// end]` array with the same numbers, set the `ranges` option to
// `true`.
//
// [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
ranges: false,
// It is possible to parse multiple files into a single AST by
// passing the tree produced by parsing the first file as
// `program` option in subsequent parses. This will add the
// toplevel forms of the parsed file to the `Program` (top) node
// of an existing parse tree.
program: null,
// When `locations` is on, you can pass this to record the source
// file in every node's `loc` object.
sourceFile: null,
// This value, if given, is stored in every node, whether
// `locations` is on or off.
directSourceFile: null,
// When enabled, parenthesized expressions are represented by
// (non-standard) ParenthesizedExpression nodes
preserveParens: false
}
// Interpret and default an options object
let warnedAboutEcmaVersion = false
export function getOptions(opts) {
let options = {}
for (let opt in defaultOptions)
options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]
if (options.ecmaVersion === "latest") {
options.ecmaVersion = 1e8
} else if (options.ecmaVersion == null) {
if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) {
warnedAboutEcmaVersion = true
console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")
}
options.ecmaVersion = 11
} else if (options.ecmaVersion >= 2015) {
options.ecmaVersion -= 2009
}
if (options.allowReserved == null)
options.allowReserved = options.ecmaVersion < 5
if (!opts || opts.allowHashBang == null)
options.allowHashBang = options.ecmaVersion >= 14
if (isArray(options.onToken)) {
let tokens = options.onToken
options.onToken = (token) => tokens.push(token)
}
if (isArray(options.onComment))
options.onComment = pushComment(options, options.onComment)
if (options.sourceType === "commonjs" && options.allowAwaitOutsideFunction)
throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs")
return options
}
function pushComment(options, array) {
return function(block, text, start, end, startLoc, endLoc) {
let comment = {
type: block ? "Block" : "Line",
value: text,
start: start,
end: end
}
if (options.locations)
comment.loc = new SourceLocation(this, startLoc, endLoc)
if (options.ranges)
comment.range = [start, end]
array.push(comment)
}
}
================================================
FILE: acorn/src/package.json
================================================
{
"type": "module"
}
================================================
FILE: acorn/src/parseutil.js
================================================
import {types as tt} from "./tokentype.js"
import {Parser} from "./state.js"
import {lineBreak, skipWhiteSpace} from "./whitespace.js"
const pp = Parser.prototype
// ## Parser utilities
const literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/
pp.strictDirective = function(start) {
if (this.options.ecmaVersion < 5) return false
for (;;) {
// Try to find string literal.
skipWhiteSpace.lastIndex = start
start += skipWhiteSpace.exec(this.input)[0].length
let match = literal.exec(this.input.slice(start))
if (!match) return false
if ((match[1] || match[2]) === "use strict") {
skipWhiteSpace.lastIndex = start + match[0].length
let spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length
let next = this.input.charAt(end)
return next === ";" || next === "}" ||
(lineBreak.test(spaceAfter[0]) &&
!(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="))
}
start += match[0].length
// Skip semicolon, if any.
skipWhiteSpace.lastIndex = start
start += skipWhiteSpace.exec(this.input)[0].length
if (this.input[start] === ";")
start++
}
}
// Predicate that tests whether the next token is of the given
// type, and if yes, consumes it as a side effect.
pp.eat = function(type) {
if (this.type === type) {
this.next()
return true
} else {
return false
}
}
// Tests whether parsed token is a contextual keyword.
pp.isContextual = function(name) {
return this.type === tt.name && this.value === name && !this.containsEsc
}
// Consumes contextual keyword if possible.
pp.eatContextual = function(name) {
if (!this.isContextual(name)) return false
this.next()
return true
}
// Asserts that following token is given contextual keyword.
pp.expectContextual = function(name) {
if (!this.eatContextual(name)) this.unexpected()
}
// Test whether a semicolon can be inserted at the current position.
pp.canInsertSemicolon = function() {
return this.type === tt.eof ||
this.type === tt.braceR ||
lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
}
pp.insertSemicolon = function() {
if (this.canInsertSemicolon()) {
if (this.options.onInsertedSemicolon)
this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
return true
}
}
// Consume a semicolon, or, failing that, see if we are allowed to
// pretend that there is a semicolon at this position.
pp.semicolon = function() {
if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
}
pp.afterTrailingComma = function(tokType, notNext) {
if (this.type === tokType) {
if (this.options.onTrailingComma)
this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
if (!notNext)
this.next()
return true
}
}
// Expect a token of a given type. If found, consume it, otherwise,
// raise an unexpected token error.
pp.expect = function(type) {
this.eat(type) || this.unexpected()
}
// Raise an unexpected token error.
pp.unexpected = function(pos) {
this.raise(pos != null ? pos : this.start, "Unexpected token")
}
export class DestructuringErrors {
constructor() {
this.shorthandAssign =
this.trailingComma =
this.parenthesizedAssign =
this.parenthesizedBind =
this.doubleProto =
-1
}
}
pp.checkPatternErrors = function(refDestructuringErrors, isAssign) {
if (!refDestructuringErrors) return
if (refDestructuringErrors.trailingComma > -1)
this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element")
let parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind
if (parens > -1) this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern")
}
pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
if (!refDestructuringErrors) return false
let {shorthandAssign, doubleProto} = refDestructuringErrors
if (!andThrow) return shorthandAssign >= 0 || doubleProto >= 0
if (shorthandAssign >= 0)
this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns")
if (doubleProto >= 0)
this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property")
}
pp.checkYieldAwaitInDefaultParams = function() {
if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos))
this.raise(this.yieldPos, "Yield expression cannot be a default value")
if (this.awaitPos)
this.raise(this.awaitPos, "Await expression cannot be a default value")
}
pp.isSimpleAssignTarget = function(expr) {
if (expr.type === "ParenthesizedExpression")
return this.isSimpleAssignTarget(expr.expression)
return expr.type === "Identifier" || expr.type === "MemberExpression"
}
================================================
FILE: acorn/src/regexp.js
================================================
import {isIdentifierStart, isIdentifierChar} from "./identifier.js"
import {Parser} from "./state.js"
import UNICODE_PROPERTY_VALUES from "./unicode-property-data.js"
import {hasOwn, codePointToString} from "./util.js"
const pp = Parser.prototype
// Track disjunction structure to determine whether a duplicate
// capture group name is allowed because it is in a separate branch.
class BranchID {
constructor(parent, base) {
// Parent disjunction branch
this.parent = parent
// Identifies this set of sibling branches
this.base = base || this
}
separatedFrom(alt) {
// A branch is separate from another branch if they or any of
// their parents are siblings in a given disjunction
for (let self = this; self; self = self.parent) {
for (let other = alt; other; other = other.parent) {
if (self.base === other.base && self !== other) return true
}
}
return false
}
sibling() {
return new BranchID(this.parent, this.base)
}
}
export class RegExpValidationState {
constructor(parser) {
this.parser = parser
this.validFlags = `gim${parser.options.ecmaVersion >= 6 ? "uy" : ""}${parser.options.ecmaVersion >= 9 ? "s" : ""}${parser.options.ecmaVersion >= 13 ? "d" : ""}${parser.options.ecmaVersion >= 15 ? "v" : ""}`
this.unicodeProperties = UNICODE_PROPERTY_VALUES[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]
this.source = ""
this.flags = ""
this.start = 0
this.switchU = false
this.switchV = false
this.switchN = false
this.pos = 0
this.lastIntValue = 0
this.lastStringValue = ""
this.lastAssertionIsQuantifiable = false
this.numCapturingParens = 0
this.maxBackReference = 0
this.groupNames = Object.create(null)
this.backReferenceNames = []
this.branchID = null
}
reset(start, pattern, flags) {
const unicodeSets = flags.indexOf("v") !== -1
const unicode = flags.indexOf("u") !== -1
this.start = start | 0
this.source = pattern + ""
this.flags = flags
if (unicodeSets && this.parser.options.ecmaVersion >= 15) {
this.switchU = true
this.switchV = true
this.switchN = true
} else {
this.switchU = unicode && this.parser.options.ecmaVersion >= 6
this.switchV = false
this.switchN = unicode && this.parser.options.ecmaVersion >= 9
}
}
raise(message) {
this.parser.raiseRecoverable(this.start, `Invalid regular expression: /${this.source}/: ${message}`)
}
// If u flag is given, this returns the code point at the index (it combines a surrogate pair).
// Otherwise, this returns the code unit of the index (can be a part of a surrogate pair).
at(i, forceU = false) {
const s = this.source
const l = s.length
if (i >= l) {
return -1
}
const c = s.charCodeAt(i)
if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) {
return c
}
const next = s.charCodeAt(i + 1)
return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c
}
nextIndex(i, forceU = false) {
const s = this.source
const l = s.length
if (i >= l) {
return l
}
let c = s.charCodeAt(i), next
if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l ||
(next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) {
return i + 1
}
return i + 2
}
current(forceU = false) {
return this.at(this.pos, forceU)
}
lookahead(forceU = false) {
return this.at(this.nextIndex(this.pos, forceU), forceU)
}
advance(forceU = false) {
this.pos = this.nextIndex(this.pos, forceU)
}
eat(ch, forceU = false) {
if (this.current(forceU) === ch) {
this.advance(forceU)
return true
}
return false
}
eatChars(chs, forceU = false) {
let pos = this.pos
for (const ch of chs) {
const current = this.at(pos, forceU)
if (current === -1 || current !== ch) {
return false
}
pos = this.nextIndex(pos, forceU)
}
this.pos = pos
return true
}
}
/**
* Validate the flags part of a given RegExpLiteral.
*
* @param {RegExpValidationState} state The state to validate RegExp.
* @returns {void}
*/
pp.validateRegExpFlags = function(state) {
const validFlags = state.validFlags
const flags = state.flags
let u = false
let v = false
for (let i = 0; i < flags.length; i++) {
const flag = flags.charAt(i)
if (validFlags.indexOf(flag) === -1) {
this.raise(state.start, "Invalid regular expression flag")
}
if (flags.indexOf(flag, i + 1) > -1) {
this.raise(state.start, "Duplicate regular expression flag")
}
if (flag === "u") u = true
if (flag === "v") v = true
}
if (this.options.ecmaVersion >= 15 && u && v) {
this.raise(state.start, "Invalid regular expression flag")
}
}
function hasProp(obj) {
for (let _ in obj) return true
return false
}
/**
* Validate the pattern part of a given RegExpLiteral.
*
* @param {RegExpValidationState} state The state to validate RegExp.
* @returns {void}
*/
pp.validateRegExpPattern = function(state) {
this.regexp_pattern(state)
// The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of
// parsing contains a |GroupName|, reparse with the goal symbol
// |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError*
// exception if _P_ did not conform to the grammar, if any elements of _P_
// were not matched by the parse, or if any Early Error conditions exist.
if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) {
state.switchN = true
this.regexp_pattern(state)
}
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern
pp.regexp_pattern = function(state) {
state.pos = 0
state.lastIntValue = 0
state.lastStringValue = ""
state.lastAssertionIsQuantifiable = false
state.numCapturingParens = 0
state.maxBackReference = 0
state.groupNames = Object.create(null)
state.backReferenceNames.length = 0
state.branchID = null
this.regexp_disjunction(state)
if (state.pos !== state.source.length) {
// Make the same messages as V8.
if (state.eat(0x29 /* ) */)) {
state.raise("Unmatched ')'")
}
if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) {
state.raise("Lone quantifier brackets")
}
}
if (state.maxBackReference > state.numCapturingParens) {
state.raise("Invalid escape")
}
for (const name of state.backReferenceNames) {
if (!state.groupNames[name]) {
state.raise("Invalid named capture referenced")
}
}
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction
pp.regexp_disjunction = function(state) {
let trackDisjunction = this.options.ecmaVersion >= 16
if (trackDisjunction) state.branchID = new BranchID(state.branchID, null)
this.regexp_alternative(state)
while (state.eat(0x7C /* | */)) {
if (trackDisjunction) state.branchID = state.branchID.sibling()
this.regexp_alternative(state)
}
if (trackDisjunction) state.branchID = state.branchID.parent
// Make the same message as V8.
if (this.regexp_eatQuantifier(state, true)) {
state.raise("Nothing to repeat")
}
if (state.eat(0x7B /* { */)) {
state.raise("Lone quantifier brackets")
}
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative
pp.regexp_alternative = function(state) {
while (state.pos < state.source.length && this.regexp_eatTerm(state)) {}
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term
pp.regexp_eatTerm = function(state) {
if (this.regexp_eatAssertion(state)) {
// Handle `QuantifiableAssertion Quantifier` alternative.
// `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion
// is a QuantifiableAssertion.
if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) {
// Make the same message as V8.
if (state.switchU) {
state.raise("Invalid quantifier")
}
}
return true
}
if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) {
this.regexp_eatQuantifier(state)
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion
pp.regexp_eatAssertion = function(state) {
const start = state.pos
state.lastAssertionIsQuantifiable = false
// ^, $
if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) {
return true
}
// \b \B
if (state.eat(0x5C /* \ */)) {
if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) {
return true
}
state.pos = start
}
// Lookahead / Lookbehind
if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) {
let lookbehind = false
if (this.options.ecmaVersion >= 9) {
lookbehind = state.eat(0x3C /* < */)
}
if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) {
this.regexp_disjunction(state)
if (!state.eat(0x29 /* ) */)) {
state.raise("Unterminated group")
}
state.lastAssertionIsQuantifiable = !lookbehind
return true
}
}
state.pos = start
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier
pp.regexp_eatQuantifier = function(state, noError = false) {
if (this.regexp_eatQuantifierPrefix(state, noError)) {
state.eat(0x3F /* ? */)
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix
pp.regexp_eatQuantifierPrefix = function(state, noError) {
return (
state.eat(0x2A /* * */) ||
state.eat(0x2B /* + */) ||
state.eat(0x3F /* ? */) ||
this.regexp_eatBracedQuantifier(state, noError)
)
}
pp.regexp_eatBracedQuantifier = function(state, noError) {
const start = state.pos
if (state.eat(0x7B /* { */)) {
let min = 0, max = -1
if (this.regexp_eatDecimalDigits(state)) {
min = state.lastIntValue
if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) {
max = state.lastIntValue
}
if (state.eat(0x7D /* } */)) {
// SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term
if (max !== -1 && max < min && !noError) {
state.raise("numbers out of order in {} quantifier")
}
return true
}
}
if (state.switchU && !noError) {
state.raise("Incomplete quantifier")
}
state.pos = start
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-Atom
pp.regexp_eatAtom = function(state) {
return (
this.regexp_eatPatternCharacters(state) ||
state.eat(0x2E /* . */) ||
this.regexp_eatReverseSolidusAtomEscape(state) ||
this.regexp_eatCharacterClass(state) ||
this.regexp_eatUncapturingGroup(state) ||
this.regexp_eatCapturingGroup(state)
)
}
pp.regexp_eatReverseSolidusAtomEscape = function(state) {
const start = state.pos
if (state.eat(0x5C /* \ */)) {
if (this.regexp_eatAtomEscape(state)) {
return true
}
state.pos = start
}
return false
}
pp.regexp_eatUncapturingGroup = function(state) {
const start = state.pos
if (state.eat(0x28 /* ( */)) {
if (state.eat(0x3F /* ? */)) {
if (this.options.ecmaVersion >= 16) {
const addModifiers = this.regexp_eatModifiers(state)
const hasHyphen = state.eat(0x2D /* - */)
if (addModifiers || hasHyphen) {
for (let i = 0; i < addModifiers.length; i++) {
const modifier = addModifiers.charAt(i)
if (addModifiers.indexOf(modifier, i + 1) > -1) {
state.raise("Duplicate regular expression modifiers")
}
}
if (hasHyphen) {
const removeModifiers = this.regexp_eatModifiers(state)
if (!addModifiers && !removeModifiers && state.current() === 0x3A /* : */) {
state.raise("Invalid regular expression modifiers")
}
for (let i = 0; i < removeModifiers.length; i++) {
const modifier = removeModifiers.charAt(i)
if (
removeModifiers.indexOf(modifier, i + 1) > -1 ||
addModifiers.indexOf(modifier) > -1
) {
state.raise("Duplicate regular expression modifiers")
}
}
}
}
}
if (state.eat(0x3A /* : */)) {
this.regexp_disjunction(state)
if (state.eat(0x29 /* ) */)) {
return true
}
state.raise("Unterminated group")
}
}
state.pos = start
}
return false
}
pp.regexp_eatCapturingGroup = function(state) {
if (state.eat(0x28 /* ( */)) {
if (this.options.ecmaVersion >= 9) {
this.regexp_groupSpecifier(state)
} else if (state.current() === 0x3F /* ? */) {
state.raise("Invalid group")
}
this.regexp_disjunction(state)
if (state.eat(0x29 /* ) */)) {
state.numCapturingParens += 1
return true
}
state.raise("Unterminated group")
}
return false
}
// RegularExpressionModifiers ::
// [empty]
// RegularExpressionModifiers RegularExpressionModifier
pp.regexp_eatModifiers = function(state) {
let modifiers = ""
let ch = 0
while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) {
modifiers += codePointToString(ch)
state.advance()
}
return modifiers
}
// RegularExpressionModifier :: one of
// `i` `m` `s`
function isRegularExpressionModifier(ch) {
return ch === 0x69 /* i */ || ch === 0x6d /* m */ || ch === 0x73 /* s */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom
pp.regexp_eatExtendedAtom = function(state) {
return (
state.eat(0x2E /* . */) ||
this.regexp_eatReverseSolidusAtomEscape(state) ||
this.regexp_eatCharacterClass(state) ||
this.regexp_eatUncapturingGroup(state) ||
this.regexp_eatCapturingGroup(state) ||
this.regexp_eatInvalidBracedQuantifier(state) ||
this.regexp_eatExtendedPatternCharacter(state)
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier
pp.regexp_eatInvalidBracedQuantifier = function(state) {
if (this.regexp_eatBracedQuantifier(state, true)) {
state.raise("Nothing to repeat")
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter
pp.regexp_eatSyntaxCharacter = function(state) {
const ch = state.current()
if (isSyntaxCharacter(ch)) {
state.lastIntValue = ch
state.advance()
return true
}
return false
}
function isSyntaxCharacter(ch) {
return (
ch === 0x24 /* $ */ ||
ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ ||
ch === 0x2E /* . */ ||
ch === 0x3F /* ? */ ||
ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ ||
ch >= 0x7B /* { */ && ch <= 0x7D /* } */
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter
// But eat eager.
pp.regexp_eatPatternCharacters = function(state) {
const start = state.pos
let ch = 0
while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) {
state.advance()
}
return state.pos !== start
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter
pp.regexp_eatExtendedPatternCharacter = function(state) {
const ch = state.current()
if (
ch !== -1 &&
ch !== 0x24 /* $ */ &&
!(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) &&
ch !== 0x2E /* . */ &&
ch !== 0x3F /* ? */ &&
ch !== 0x5B /* [ */ &&
ch !== 0x5E /* ^ */ &&
ch !== 0x7C /* | */
) {
state.advance()
return true
}
return false
}
// GroupSpecifier ::
// [empty]
// `?` GroupName
pp.regexp_groupSpecifier = function(state) {
if (state.eat(0x3F /* ? */)) {
if (!this.regexp_eatGroupName(state)) state.raise("Invalid group")
let trackDisjunction = this.options.ecmaVersion >= 16
let known = state.groupNames[state.lastStringValue]
if (known) {
if (trackDisjunction) {
for (let altID of known) {
if (!altID.separatedFrom(state.branchID))
state.raise("Duplicate capture group name")
}
} else {
state.raise("Duplicate capture group name")
}
}
if (trackDisjunction) {
(known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID)
} else {
state.groupNames[state.lastStringValue] = true
}
}
}
// GroupName ::
// `<` RegExpIdentifierName `>`
// Note: this updates `state.lastStringValue` property with the eaten name.
pp.regexp_eatGroupName = function(state) {
state.lastStringValue = ""
if (state.eat(0x3C /* < */)) {
if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) {
return true
}
state.raise("Invalid capture group name")
}
return false
}
// RegExpIdentifierName ::
// RegExpIdentifierStart
// RegExpIdentifierName RegExpIdentifierPart
// Note: this updates `state.lastStringValue` property with the eaten name.
pp.regexp_eatRegExpIdentifierName = function(state) {
state.lastStringValue = ""
if (this.regexp_eatRegExpIdentifierStart(state)) {
state.lastStringValue += codePointToString(state.lastIntValue)
while (this.regexp_eatRegExpIdentifierPart(state)) {
state.lastStringValue += codePointToString(state.lastIntValue)
}
return true
}
return false
}
// RegExpIdentifierStart ::
// UnicodeIDStart
// `$`
// `_`
// `\` RegExpUnicodeEscapeSequence[+U]
pp.regexp_eatRegExpIdentifierStart = function(state) {
const start = state.pos
const forceU = this.options.ecmaVersion >= 11
let ch = state.current(forceU)
state.advance(forceU)
if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
ch = state.lastIntValue
}
if (isRegExpIdentifierStart(ch)) {
state.lastIntValue = ch
return true
}
state.pos = start
return false
}
function isRegExpIdentifierStart(ch) {
return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */
}
// RegExpIdentifierPart ::
// UnicodeIDContinue
// `$`
// `_`
// `\` RegExpUnicodeEscapeSequence[+U]
// <ZWNJ>
// <ZWJ>
pp.regexp_eatRegExpIdentifierPart = function(state) {
const start = state.pos
const forceU = this.options.ecmaVersion >= 11
let ch = state.current(forceU)
state.advance(forceU)
if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) {
ch = state.lastIntValue
}
if (isRegExpIdentifierPart(ch)) {
state.lastIntValue = ch
return true
}
state.pos = start
return false
}
function isRegExpIdentifierPart(ch) {
return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* <ZWNJ> */ || ch === 0x200D /* <ZWJ> */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape
pp.regexp_eatAtomEscape = function(state) {
if (
this.regexp_eatBackReference(state) ||
this.regexp_eatCharacterClassEscape(state) ||
this.regexp_eatCharacterEscape(state) ||
(state.switchN && this.regexp_eatKGroupName(state))
) {
return true
}
if (state.switchU) {
// Make the same message as V8.
if (state.current() === 0x63 /* c */) {
state.raise("Invalid unicode escape")
}
state.raise("Invalid escape")
}
return false
}
pp.regexp_eatBackReference = function(state) {
const start = state.pos
if (this.regexp_eatDecimalEscape(state)) {
const n = state.lastIntValue
if (state.switchU) {
// For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape
if (n > state.maxBackReference) {
state.maxBackReference = n
}
return true
}
if (n <= state.numCapturingParens) {
return true
}
state.pos = start
}
return false
}
pp.regexp_eatKGroupName = function(state) {
if (state.eat(0x6B /* k */)) {
if (this.regexp_eatGroupName(state)) {
state.backReferenceNames.push(state.lastStringValue)
return true
}
state.raise("Invalid named reference")
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape
pp.regexp_eatCharacterEscape = function(state) {
return (
this.regexp_eatControlEscape(state) ||
this.regexp_eatCControlLetter(state) ||
this.regexp_eatZero(state) ||
this.regexp_eatHexEscapeSequence(state) ||
this.regexp_eatRegExpUnicodeEscapeSequence(state, false) ||
(!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) ||
this.regexp_eatIdentityEscape(state)
)
}
pp.regexp_eatCControlLetter = function(state) {
const start = state.pos
if (state.eat(0x63 /* c */)) {
if (this.regexp_eatControlLetter(state)) {
return true
}
state.pos = start
}
return false
}
pp.regexp_eatZero = function(state) {
if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) {
state.lastIntValue = 0
state.advance()
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape
pp.regexp_eatControlEscape = function(state) {
const ch = state.current()
if (ch === 0x74 /* t */) {
state.lastIntValue = 0x09 /* \t */
state.advance()
return true
}
if (ch === 0x6E /* n */) {
state.lastIntValue = 0x0A /* \n */
state.advance()
return true
}
if (ch === 0x76 /* v */) {
state.lastIntValue = 0x0B /* \v */
state.advance()
return true
}
if (ch === 0x66 /* f */) {
state.lastIntValue = 0x0C /* \f */
state.advance()
return true
}
if (ch === 0x72 /* r */) {
state.lastIntValue = 0x0D /* \r */
state.advance()
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter
pp.regexp_eatControlLetter = function(state) {
const ch = state.current()
if (isControlLetter(ch)) {
state.lastIntValue = ch % 0x20
state.advance()
return true
}
return false
}
function isControlLetter(ch) {
return (
(ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) ||
(ch >= 0x61 /* a */ && ch <= 0x7A /* z */)
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence
pp.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU = false) {
const start = state.pos
const switchU = forceU || state.switchU
if (state.eat(0x75 /* u */)) {
if (this.regexp_eatFixedHexDigits(state, 4)) {
const lead = state.lastIntValue
if (switchU && lead >= 0xD800 && lead <= 0xDBFF) {
const leadSurrogateEnd = state.pos
if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) {
const trail = state.lastIntValue
if (trail >= 0xDC00 && trail <= 0xDFFF) {
state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000
return true
}
}
state.pos = leadSurrogateEnd
state.lastIntValue = lead
}
return true
}
if (
switchU &&
state.eat(0x7B /* { */) &&
this.regexp_eatHexDigits(state) &&
state.eat(0x7D /* } */) &&
isValidUnicode(state.lastIntValue)
) {
return true
}
if (switchU) {
state.raise("Invalid unicode escape")
}
state.pos = start
}
return false
}
function isValidUnicode(ch) {
return ch >= 0 && ch <= 0x10FFFF
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape
pp.regexp_eatIdentityEscape = function(state) {
if (state.switchU) {
if (this.regexp_eatSyntaxCharacter(state)) {
return true
}
if (state.eat(0x2F /* / */)) {
state.lastIntValue = 0x2F /* / */
return true
}
return false
}
const ch = state.current()
if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) {
state.lastIntValue = ch
state.advance()
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape
pp.regexp_eatDecimalEscape = function(state) {
state.lastIntValue = 0
let ch = state.current()
if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) {
do {
state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)
state.advance()
} while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */)
return true
}
return false
}
// Return values used by character set parsing methods, needed to
// forbid negation of sets that can match strings.
const CharSetNone = 0 // Nothing parsed
const CharSetOk = 1 // Construct parsed, cannot contain strings
const CharSetString = 2 // Construct parsed, can contain strings
// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape
pp.regexp_eatCharacterClassEscape = function(state) {
const ch = state.current()
if (isCharacterClassEscape(ch)) {
state.lastIntValue = -1
state.advance()
return CharSetOk
}
let negate = false
if (
state.switchU &&
this.options.ecmaVersion >= 9 &&
((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */)
) {
state.lastIntValue = -1
state.advance()
let result
if (
state.eat(0x7B /* { */) &&
(result = this.regexp_eatUnicodePropertyValueExpression(state)) &&
state.eat(0x7D /* } */)
) {
if (negate && result === CharSetString) state.raise("Invalid property name")
return result
}
state.raise("Invalid property name")
}
return CharSetNone
}
function isCharacterClassEscape(ch) {
return (
ch === 0x64 /* d */ ||
ch === 0x44 /* D */ ||
ch === 0x73 /* s */ ||
ch === 0x53 /* S */ ||
ch === 0x77 /* w */ ||
ch === 0x57 /* W */
)
}
// UnicodePropertyValueExpression ::
// UnicodePropertyName `=` UnicodePropertyValue
// LoneUnicodePropertyNameOrValue
pp.regexp_eatUnicodePropertyValueExpression = function(state) {
const start = state.pos
// UnicodePropertyName `=` UnicodePropertyValue
if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) {
const name = state.lastStringValue
if (this.regexp_eatUnicodePropertyValue(state)) {
const value = state.lastStringValue
this.regexp_validateUnicodePropertyNameAndValue(state, name, value)
return CharSetOk
}
}
state.pos = start
// LoneUnicodePropertyNameOrValue
if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) {
const nameOrValue = state.lastStringValue
return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue)
}
return CharSetNone
}
pp.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) {
if (!hasOwn(state.unicodeProperties.nonBinary, name))
state.raise("Invalid property name")
if (!state.unicodeProperties.nonBinary[name].test(value))
state.raise("Invalid property value")
}
pp.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) {
if (state.unicodeProperties.binary.test(nameOrValue)) return CharSetOk
if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) return CharSetString
state.raise("Invalid property name")
}
// UnicodePropertyName ::
// UnicodePropertyNameCharacters
pp.regexp_eatUnicodePropertyName = function(state) {
let ch = 0
state.lastStringValue = ""
while (isUnicodePropertyNameCharacter(ch = state.current())) {
state.lastStringValue += codePointToString(ch)
state.advance()
}
return state.lastStringValue !== ""
}
function isUnicodePropertyNameCharacter(ch) {
return isControlLetter(ch) || ch === 0x5F /* _ */
}
// UnicodePropertyValue ::
// UnicodePropertyValueCharacters
pp.regexp_eatUnicodePropertyValue = function(state) {
let ch = 0
state.lastStringValue = ""
while (isUnicodePropertyValueCharacter(ch = state.current())) {
state.lastStringValue += codePointToString(ch)
state.advance()
}
return state.lastStringValue !== ""
}
function isUnicodePropertyValueCharacter(ch) {
return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch)
}
// LoneUnicodePropertyNameOrValue ::
// UnicodePropertyValueCharacters
pp.regexp_eatLoneUnicodePropertyNameOrValue = function(state) {
return this.regexp_eatUnicodePropertyValue(state)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass
pp.regexp_eatCharacterClass = function(state) {
if (state.eat(0x5B /* [ */)) {
const negate = state.eat(0x5E /* ^ */)
const result = this.regexp_classContents(state)
if (!state.eat(0x5D /* ] */))
state.raise("Unterminated character class")
if (negate && result === CharSetString)
state.raise("Negated character class may contain strings")
return true
}
return false
}
// https://tc39.es/ecma262/#prod-ClassContents
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges
pp.regexp_classContents = function(state) {
if (state.current() === 0x5D /* ] */) return CharSetOk
if (state.switchV) return this.regexp_classSetExpression(state)
this.regexp_nonEmptyClassRanges(state)
return CharSetOk
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges
// https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash
pp.regexp_nonEmptyClassRanges = function(state) {
while (this.regexp_eatClassAtom(state)) {
const left = state.lastIntValue
if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) {
const right = state.lastIntValue
if (state.switchU && (left === -1 || right === -1)) {
state.raise("Invalid character class")
}
if (left !== -1 && right !== -1 && left > right) {
state.raise("Range out of order in character class")
}
}
}
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom
// https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash
pp.regexp_eatClassAtom = function(state) {
const start = state.pos
if (state.eat(0x5C /* \ */)) {
if (this.regexp_eatClassEscape(state)) {
return true
}
if (state.switchU) {
// Make the same message as V8.
const ch = state.current()
if (ch === 0x63 /* c */ || isOctalDigit(ch)) {
state.raise("Invalid class escape")
}
state.raise("Invalid escape")
}
state.pos = start
}
const ch = state.current()
if (ch !== 0x5D /* ] */) {
state.lastIntValue = ch
state.advance()
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape
pp.regexp_eatClassEscape = function(state) {
const start = state.pos
if (state.eat(0x62 /* b */)) {
state.lastIntValue = 0x08 /* <BS> */
return true
}
if (state.switchU && state.eat(0x2D /* - */)) {
state.lastIntValue = 0x2D /* - */
return true
}
if (!state.switchU && state.eat(0x63 /* c */)) {
if (this.regexp_eatClassControlLetter(state)) {
return true
}
state.pos = start
}
return (
this.regexp_eatCharacterClassEscape(state) ||
this.regexp_eatCharacterEscape(state)
)
}
// https://tc39.es/ecma262/#prod-ClassSetExpression
// https://tc39.es/ecma262/#prod-ClassUnion
// https://tc39.es/ecma262/#prod-ClassIntersection
// https://tc39.es/ecma262/#prod-ClassSubtraction
pp.regexp_classSetExpression = function(state) {
let result = CharSetOk, subResult
if (this.regexp_eatClassSetRange(state)) {
// Continue with ClassUnion processing.
} else if (subResult = this.regexp_eatClassSetOperand(state)) {
if (subResult === CharSetString) result = CharSetString
// https://tc39.es/ecma262/#prod-ClassIntersection
const start = state.pos
while (state.eatChars([0x26, 0x26] /* && */)) {
if (
state.current() !== 0x26 /* & */ &&
(subResult = this.regexp_eatClassSetOperand(state))
) {
if (subResult !== CharSetString) result = CharSetOk
continue
}
state.raise("Invalid character in character class")
}
if (start !== state.pos) return result
// https://tc39.es/ecma262/#prod-ClassSubtraction
while (state.eatChars([0x2D, 0x2D] /* -- */)) {
if (this.regexp_eatClassSetOperand(state)) continue
state.raise("Invalid character in character class")
}
if (start !== state.pos) return result
} else {
state.raise("Invalid character in character class")
}
// https://tc39.es/ecma262/#prod-ClassUnion
for (;;) {
if (this.regexp_eatClassSetRange(state)) continue
subResult = this.regexp_eatClassSetOperand(state)
if (!subResult) return result
if (subResult === CharSetString) result = CharSetString
}
}
// https://tc39.es/ecma262/#prod-ClassSetRange
pp.regexp_eatClassSetRange = function(state) {
const start = state.pos
if (this.regexp_eatClassSetCharacter(state)) {
const left = state.lastIntValue
if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) {
const right = state.lastIntValue
if (left !== -1 && right !== -1 && left > right) {
state.raise("Range out of order in character class")
}
return true
}
state.pos = start
}
return false
}
// https://tc39.es/ecma262/#prod-ClassSetOperand
pp.regexp_eatClassSetOperand = function(state) {
if (this.regexp_eatClassSetCharacter(state)) return CharSetOk
return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state)
}
// https://tc39.es/ecma262/#prod-NestedClass
pp.regexp_eatNestedClass = function(state) {
const start = state.pos
if (state.eat(0x5B /* [ */)) {
const negate = state.eat(0x5E /* ^ */)
const result = this.regexp_classContents(state)
if (state.eat(0x5D /* ] */)) {
if (negate && result === CharSetString) {
state.raise("Negated character class may contain strings")
}
return result
}
state.pos = start
}
if (state.eat(0x5C /* \ */)) {
const result = this.regexp_eatCharacterClassEscape(state)
if (result) {
return result
}
state.pos = start
}
return null
}
// https://tc39.es/ecma262/#prod-ClassStringDisjunction
pp.regexp_eatClassStringDisjunction = function(state) {
const start = state.pos
if (state.eatChars([0x5C, 0x71] /* \q */)) {
if (state.eat(0x7B /* { */)) {
const result = this.regexp_classStringDisjunctionContents(state)
if (state.eat(0x7D /* } */)) {
return result
}
} else {
// Make the same message as V8.
state.raise("Invalid escape")
}
state.pos = start
}
return null
}
// https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents
pp.regexp_classStringDisjunctionContents = function(state) {
let result = this.regexp_classString(state)
while (state.eat(0x7C /* | */)) {
if (this.regexp_classString(state) === CharSetString) result = CharSetString
}
return result
}
// https://tc39.es/ecma262/#prod-ClassString
// https://tc39.es/ecma262/#prod-NonEmptyClassString
pp.regexp_classString = function(state) {
let count = 0
while (this.regexp_eatClassSetCharacter(state)) count++
return count === 1 ? CharSetOk : CharSetString
}
// https://tc39.es/ecma262/#prod-ClassSetCharacter
pp.regexp_eatClassSetCharacter = function(state) {
const start = state.pos
if (state.eat(0x5C /* \ */)) {
if (
this.regexp_eatCharacterEscape(state) ||
this.regexp_eatClassSetReservedPunctuator(state)
) {
return true
}
if (state.eat(0x62 /* b */)) {
state.lastIntValue = 0x08 /* <BS> */
return true
}
state.pos = start
return false
}
const ch = state.current()
if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) return false
if (isClassSetSyntaxCharacter(ch)) return false
state.advance()
state.lastIntValue = ch
return true
}
// https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator
function isClassSetReservedDoublePunctuatorCharacter(ch) {
return (
ch === 0x21 /* ! */ ||
ch >= 0x23 /* # */ && ch <= 0x26 /* & */ ||
ch >= 0x2A /* * */ && ch <= 0x2C /* , */ ||
ch === 0x2E /* . */ ||
ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ ||
ch === 0x5E /* ^ */ ||
ch === 0x60 /* ` */ ||
ch === 0x7E /* ~ */
)
}
// https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter
function isClassSetSyntaxCharacter(ch) {
return (
ch === 0x28 /* ( */ ||
ch === 0x29 /* ) */ ||
ch === 0x2D /* - */ ||
ch === 0x2F /* / */ ||
ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ ||
ch >= 0x7B /* { */ && ch <= 0x7D /* } */
)
}
// https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator
pp.regexp_eatClassSetReservedPunctuator = function(state) {
const ch = state.current()
if (isClassSetReservedPunctuator(ch)) {
state.lastIntValue = ch
state.advance()
return true
}
return false
}
// https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator
function isClassSetReservedPunctuator(ch) {
return (
ch === 0x21 /* ! */ ||
ch === 0x23 /* # */ ||
ch === 0x25 /* % */ ||
ch === 0x26 /* & */ ||
ch === 0x2C /* , */ ||
ch === 0x2D /* - */ ||
ch >= 0x3A /* : */ && ch <= 0x3E /* > */ ||
ch === 0x40 /* @ */ ||
ch === 0x60 /* ` */ ||
ch === 0x7E /* ~ */
)
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter
pp.regexp_eatClassControlLetter = function(state) {
const ch = state.current()
if (isDecimalDigit(ch) || ch === 0x5F /* _ */) {
state.lastIntValue = ch % 0x20
state.advance()
return true
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence
pp.regexp_eatHexEscapeSequence = function(state) {
const start = state.pos
if (state.eat(0x78 /* x */)) {
if (this.regexp_eatFixedHexDigits(state, 2)) {
return true
}
if (state.switchU) {
state.raise("Invalid escape")
}
state.pos = start
}
return false
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits
pp.regexp_eatDecimalDigits = function(state) {
const start = state.pos
let ch = 0
state.lastIntValue = 0
while (isDecimalDigit(ch = state.current())) {
state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */)
state.advance()
}
return state.pos !== start
}
function isDecimalDigit(ch) {
return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */
}
// https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits
pp.regexp_eatHexDigits = function(state) {
const start = state.pos
let ch
gitextract_cmmrs2kq/
├── .editorconfig
├── .gitattributes
├── .github/
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .mailmap
├── .npmignore
├── .npmrc
├── .nvmrc
├── .tern-project
├── AUTHORS
├── README.md
├── acorn/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── bin/
│ │ └── acorn
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── acorn.d.ts
│ ├── bin/
│ │ └── acorn.js
│ ├── expression.js
│ ├── generated/
│ │ ├── astralIdentifierCodes.js
│ │ ├── astralIdentifierStartCodes.js
│ │ ├── nonASCIIidentifierChars.js
│ │ ├── nonASCIIidentifierStartChars.js
│ │ └── scriptValuesAddedInUnicode.js
│ ├── identifier.js
│ ├── index.js
│ ├── location.js
│ ├── locutil.js
│ ├── lval.js
│ ├── node.js
│ ├── options.js
│ ├── package.json
│ ├── parseutil.js
│ ├── regexp.js
│ ├── scope.js
│ ├── scopeflags.js
│ ├── state.js
│ ├── statement.js
│ ├── tokencontext.js
│ ├── tokenize.js
│ ├── tokentype.js
│ ├── unicode-property-data.js
│ ├── util.js
│ └── whitespace.js
├── acorn-loose/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── acorn-loose.d.ts
│ ├── expression.js
│ ├── index.js
│ ├── package.json
│ ├── parseutil.js
│ ├── state.js
│ ├── statement.js
│ └── tokenize.js
├── acorn-walk/
│ ├── .npmignore
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── package.json
│ ├── rollup.config.mjs
│ └── src/
│ ├── index.js
│ ├── package.json
│ └── walk.d.ts
├── bin/
│ ├── generate-identifier-regex.js
│ ├── generate-unicode-script-values.js
│ ├── run_test262.js
│ ├── test262.unsupported-features
│ ├── test262.whitelist
│ └── update_authors.sh
├── eslint.config.mjs
├── package.json
└── test/
├── bench/
│ ├── common.js
│ ├── fixtures/
│ │ ├── angular.js
│ │ ├── backbone.js
│ │ ├── ember.js
│ │ ├── jquery.js
│ │ ├── react-dom.js
│ │ └── react.js
│ ├── index.html
│ ├── index.js
│ ├── package.json
│ └── worker.js
├── driver.js
├── run.js
├── tests-async-iteration.js
├── tests-asyncawait.js
├── tests-await-top-level.js
├── tests-bigint.js
├── tests-class-features-2022.js
├── tests-commonjs.js
├── tests-directive.js
├── tests-dynamic-import.js
├── tests-es7.js
├── tests-export-all-as-ns-from-source.js
├── tests-export-named.js
├── tests-harmony.js
├── tests-import-attributes.js
├── tests-import-meta.js
├── tests-json-superset.js
├── tests-logical-assignment-operators.js
├── tests-module-string-names.js
├── tests-nullish-coalescing.js
├── tests-numeric-separators.js
├── tests-optional-catch-binding.js
├── tests-optional-chaining.js
├── tests-regexp-2018.js
├── tests-regexp-2020.js
├── tests-regexp-2022.js
├── tests-regexp-2024.js
├── tests-regexp-2025.js
├── tests-regexp.js
├── tests-rest-spread-properties.js
├── tests-template-literal-revision.js
├── tests-trailing-commas-in-func.js
├── tests-using.js
└── tests.js
SYMBOL INDEX (2192 symbols across 43 files)
FILE: acorn-loose/rollup.config.mjs
method writeBundle (line 5) | async writeBundle() { await writeFile(to, await readFile(from)) }
FILE: acorn-loose/src/index.js
function parse (line 43) | function parse(input, options) {
FILE: acorn-loose/src/parseutil.js
function isDummy (line 3) | function isDummy(node) { return node.name === dummyValue }
FILE: acorn-loose/src/state.js
function noop (line 4) | function noop() {}
class LooseParser (line 6) | class LooseParser {
method constructor (line 7) | constructor(input, options = {}) {
method startNode (line 28) | startNode() {
method storeCurrentPos (line 32) | storeCurrentPos() {
method startNodeAt (line 36) | startNodeAt(pos) {
method finishNode (line 44) | finishNode(node, type) {
method dummyNode (line 54) | dummyNode(type) {
method dummyIdent (line 66) | dummyIdent() {
method dummyString (line 72) | dummyString() {
method eat (line 78) | eat(type) {
method isContextual (line 87) | isContextual(name) {
method eatContextual (line 91) | eatContextual(name) {
method canInsertSemicolon (line 95) | canInsertSemicolon() {
method semicolon (line 100) | semicolon() {
method expect (line 104) | expect(type) {
method pushCx (line 114) | pushCx() {
method popCx (line 118) | popCx() {
method lineEnd (line 122) | lineEnd(pos) {
method indentationAfter (line 127) | indentationAfter(pos) {
method closes (line 136) | closes(closeTok, indent, line, blockHeuristic) {
method tokenStartsLine (line 143) | tokenStartsLine() {
method extend (line 151) | extend(name, f) {
method parse (line 155) | parse() {
method extend (line 160) | static extend(...plugins) {
method parse (line 166) | static parse(input, options) {
FILE: acorn-loose/src/tokenize.js
function isSpace (line 7) | function isSpace(ch) {
FILE: acorn-walk/rollup.config.mjs
method writeBundle (line 5) | async writeBundle() { await writeFile(to, await readFile(from)) }
FILE: acorn-walk/src/index.js
function simple (line 19) | function simple(node, visitors, baseVisitor, state, override) {
function ancestor (line 31) | function ancestor(node, visitors, baseVisitor, state, override) {
function recursive (line 49) | function recursive(node, state, funcs, baseVisitor, override) {
function makeTest (line 56) | function makeTest(test) {
class Found (line 65) | class Found {
method constructor (line 66) | constructor(node, state) { this.node = node; this.state = state }
function full (line 70) | function full(node, callback, baseVisitor, state, override) {
function fullAncestor (line 85) | function fullAncestor(node, callback, baseVisitor, state) {
function findNodeAt (line 104) | function findNodeAt(node, start, end, test, baseVisitor, state) {
function findNodeAround (line 126) | function findNodeAround(node, pos, test, baseVisitor, state) {
function findNodeAfter (line 143) | function findNodeAfter(node, pos, test, baseVisitor, state) {
function findNodeBefore (line 160) | function findNodeBefore(node, pos, test, baseVisitor, state) {
function make (line 176) | function make(funcs, baseVisitor) {
function skipThrough (line 182) | function skipThrough(node, st, c) { c(node, st) }
function ignore (line 183) | function ignore(_node, _st, _c) {}
function visitNode (line 185) | function visitNode(baseVisitor, type, node, st, c) {
FILE: acorn-walk/src/walk.d.ts
type FullWalkerCallback (line 3) | type FullWalkerCallback<TState> = (
type FullAncestorWalkerCallback (line 9) | type FullAncestorWalkerCallback<TState> = (
type AggregateType (line 16) | type AggregateType = {
type SimpleVisitors (line 25) | type SimpleVisitors<TState> = {
type AncestorVisitors (line 31) | type AncestorVisitors<TState> = {
type WalkerCallback (line 38) | type WalkerCallback<TState> = (node: acorn.AnyNode, state: TState) => void
type RecursiveVisitors (line 40) | type RecursiveVisitors<TState> = {
type FindPredicate (line 46) | type FindPredicate = (type: string, node: acorn.AnyNode) => boolean
type Found (line 48) | interface Found<TState> {
FILE: acorn/rollup.config.mjs
method writeBundle (line 5) | async writeBundle() { await writeFile(to, await readFile(from)) }
FILE: acorn/src/acorn.d.ts
type Node (line 1) | interface Node {
type SourceLocation (line 9) | interface SourceLocation {
type Position (line 15) | interface Position {
type Identifier (line 22) | interface Identifier extends Node {
type Literal (line 27) | interface Literal extends Node {
type Program (line 38) | interface Program extends Node {
type Function (line 44) | interface Function extends Node {
type ExpressionStatement (line 53) | interface ExpressionStatement extends Node {
type BlockStatement (line 59) | interface BlockStatement extends Node {
type EmptyStatement (line 64) | interface EmptyStatement extends Node {
type DebuggerStatement (line 68) | interface DebuggerStatement extends Node {
type WithStatement (line 72) | interface WithStatement extends Node {
type ReturnStatement (line 78) | interface ReturnStatement extends Node {
type LabeledStatement (line 83) | interface LabeledStatement extends Node {
type BreakStatement (line 89) | interface BreakStatement extends Node {
type ContinueStatement (line 94) | interface ContinueStatement extends Node {
type IfStatement (line 99) | interface IfStatement extends Node {
type SwitchStatement (line 106) | interface SwitchStatement extends Node {
type SwitchCase (line 112) | interface SwitchCase extends Node {
type ThrowStatement (line 118) | interface ThrowStatement extends Node {
type TryStatement (line 123) | interface TryStatement extends Node {
type CatchClause (line 130) | interface CatchClause extends Node {
type WhileStatement (line 136) | interface WhileStatement extends Node {
type DoWhileStatement (line 142) | interface DoWhileStatement extends Node {
type ForStatement (line 148) | interface ForStatement extends Node {
type ForInStatement (line 156) | interface ForInStatement extends Node {
type FunctionDeclaration (line 163) | interface FunctionDeclaration extends Function {
type VariableDeclaration (line 169) | interface VariableDeclaration extends Node {
type VariableDeclarator (line 175) | interface VariableDeclarator extends Node {
type ThisExpression (line 181) | interface ThisExpression extends Node {
type ArrayExpression (line 185) | interface ArrayExpression extends Node {
type ObjectExpression (line 190) | interface ObjectExpression extends Node {
type Property (line 195) | interface Property extends Node {
type FunctionExpression (line 205) | interface FunctionExpression extends Function {
type UnaryExpression (line 210) | interface UnaryExpression extends Node {
type UnaryOperator (line 217) | type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete"
type UpdateExpression (line 219) | interface UpdateExpression extends Node {
type UpdateOperator (line 226) | type UpdateOperator = "++" | "--"
type BinaryExpression (line 228) | interface BinaryExpression extends Node {
type BinaryOperator (line 235) | type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | "...
type AssignmentExpression (line 237) | interface AssignmentExpression extends Node {
type AssignmentOperator (line 244) | type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<="...
type LogicalExpression (line 246) | interface LogicalExpression extends Node {
type LogicalOperator (line 253) | type LogicalOperator = "||" | "&&" | "??"
type MemberExpression (line 255) | interface MemberExpression extends Node {
type ConditionalExpression (line 263) | interface ConditionalExpression extends Node {
type CallExpression (line 270) | interface CallExpression extends Node {
type NewExpression (line 277) | interface NewExpression extends Node {
type SequenceExpression (line 283) | interface SequenceExpression extends Node {
type ForOfStatement (line 288) | interface ForOfStatement extends Node {
type Super (line 296) | interface Super extends Node {
type SpreadElement (line 300) | interface SpreadElement extends Node {
type ArrowFunctionExpression (line 305) | interface ArrowFunctionExpression extends Function {
type YieldExpression (line 309) | interface YieldExpression extends Node {
type TemplateLiteral (line 315) | interface TemplateLiteral extends Node {
type TaggedTemplateExpression (line 321) | interface TaggedTemplateExpression extends Node {
type TemplateElement (line 327) | interface TemplateElement extends Node {
type AssignmentProperty (line 336) | interface AssignmentProperty extends Node {
type ObjectPattern (line 346) | interface ObjectPattern extends Node {
type ArrayPattern (line 351) | interface ArrayPattern extends Node {
type RestElement (line 356) | interface RestElement extends Node {
type AssignmentPattern (line 361) | interface AssignmentPattern extends Node {
type Class (line 367) | interface Class extends Node {
type ClassBody (line 373) | interface ClassBody extends Node {
type MethodDefinition (line 378) | interface MethodDefinition extends Node {
type ClassDeclaration (line 387) | interface ClassDeclaration extends Class {
type ClassExpression (line 392) | interface ClassExpression extends Class {
type MetaProperty (line 396) | interface MetaProperty extends Node {
type ImportDeclaration (line 402) | interface ImportDeclaration extends Node {
type ImportSpecifier (line 409) | interface ImportSpecifier extends Node {
type ImportDefaultSpecifier (line 415) | interface ImportDefaultSpecifier extends Node {
type ImportNamespaceSpecifier (line 420) | interface ImportNamespaceSpecifier extends Node {
type ImportAttribute (line 425) | interface ImportAttribute extends Node {
type ExportNamedDeclaration (line 431) | interface ExportNamedDeclaration extends Node {
type ExportSpecifier (line 439) | interface ExportSpecifier extends Node {
type AnonymousFunctionDeclaration (line 445) | interface AnonymousFunctionDeclaration extends Function {
type AnonymousClassDeclaration (line 451) | interface AnonymousClassDeclaration extends Class {
type ExportDefaultDeclaration (line 456) | interface ExportDefaultDeclaration extends Node {
type ExportAllDeclaration (line 461) | interface ExportAllDeclaration extends Node {
type AwaitExpression (line 468) | interface AwaitExpression extends Node {
type ChainExpression (line 473) | interface ChainExpression extends Node {
type ImportExpression (line 478) | interface ImportExpression extends Node {
type ParenthesizedExpression (line 484) | interface ParenthesizedExpression extends Node {
type PropertyDefinition (line 489) | interface PropertyDefinition extends Node {
type PrivateIdentifier (line 497) | interface PrivateIdentifier extends Node {
type StaticBlock (line 502) | interface StaticBlock extends Node {
type Statement (line 507) | type Statement =
type Declaration (line 528) | type Declaration =
type Expression (line 533) | type Expression =
type Pattern (line 561) | type Pattern =
type ModuleDeclaration (line 569) | type ModuleDeclaration =
type NodeTypes (line 588) | interface NodeTypes {
type AnyNode (line 592) | type AnyNode = NodeTypes[keyof NodeTypes]
type ecmaVersion (line 603) | type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |...
type Options (line 605) | interface Options {
class Parser (line 758) | class Parser {
class TokenType (line 778) | class TokenType {
type Comment (line 866) | interface Comment {
class Token (line 875) | class Token {
FILE: acorn/src/bin/acorn.js
function help (line 8) | function help(status) {
function run (line 39) | function run(codeList) {
FILE: acorn/src/expression.js
function isLocalVariableAccess (line 280) | function isLocalVariableAccess(node) {
function isPrivateFieldAccess (line 287) | function isPrivateFieldAccess(node) {
FILE: acorn/src/identifier.js
function isInAstralSet (line 44) | function isInAstralSet(code, set) {
function isIdentifierStart (line 57) | function isIdentifierStart(code, astral) {
function isIdentifierChar (line 69) | function isIdentifierChar(code, astral) {
FILE: acorn/src/index.js
function parse (line 82) | function parse(input, options) {
function parseExpressionAt (line 90) | function parseExpressionAt(input, pos, options) {
function tokenizer (line 97) | function tokenizer(input, options) {
FILE: acorn/src/locutil.js
class Position (line 6) | class Position {
method constructor (line 7) | constructor(line, col) {
method offset (line 12) | offset(n) {
class SourceLocation (line 17) | class SourceLocation {
method constructor (line 18) | constructor(p, start, end) {
function getLineInfo (line 31) | function getLineInfo(input, offset) {
FILE: acorn/src/node.js
class Node (line 4) | class Node {
method constructor (line 5) | constructor(parser, pos, loc) {
function finishNodeAt (line 32) | function finishNodeAt(node, type, pos, loc) {
FILE: acorn/src/options.js
function getOptions (line 109) | function getOptions(opts) {
function pushComment (line 146) | function pushComment(options, array) {
FILE: acorn/src/parseutil.js
class DestructuringErrors (line 114) | class DestructuringErrors {
method constructor (line 115) | constructor() {
FILE: acorn/src/regexp.js
class BranchID (line 10) | class BranchID {
method constructor (line 11) | constructor(parent, base) {
method separatedFrom (line 18) | separatedFrom(alt) {
method sibling (line 29) | sibling() {
class RegExpValidationState (line 34) | class RegExpValidationState {
method constructor (line 35) | constructor(parser) {
method reset (line 56) | reset(start, pattern, flags) {
method raise (line 73) | raise(message) {
method at (line 79) | at(i, forceU = false) {
method nextIndex (line 93) | nextIndex(i, forceU = false) {
method current (line 107) | current(forceU = false) {
method lookahead (line 111) | lookahead(forceU = false) {
method advance (line 115) | advance(forceU = false) {
method eat (line 119) | eat(ch, forceU = false) {
method eatChars (line 127) | eatChars(chs, forceU = false) {
function hasProp (line 170) | function hasProp(obj) {
function isRegularExpressionModifier (line 451) | function isRegularExpressionModifier(ch) {
function isSyntaxCharacter (line 486) | function isSyntaxCharacter(ch) {
function isRegExpIdentifierStart (line 605) | function isRegExpIdentifierStart(ch) {
function isRegExpIdentifierPart (line 633) | function isRegExpIdentifierPart(ch) {
function isControlLetter (line 757) | function isControlLetter(ch) {
function isValidUnicode (line 803) | function isValidUnicode(ch) {
function isCharacterClassEscape (line 883) | function isCharacterClassEscape(ch) {
function isUnicodePropertyNameCharacter (line 944) | function isUnicodePropertyNameCharacter(ch) {
function isUnicodePropertyValueCharacter (line 959) | function isUnicodePropertyValueCharacter(ch) {
function isClassSetReservedDoublePunctuatorCharacter (line 1215) | function isClassSetReservedDoublePunctuatorCharacter(ch) {
function isClassSetSyntaxCharacter (line 1229) | function isClassSetSyntaxCharacter(ch) {
function isClassSetReservedPunctuator (line 1252) | function isClassSetReservedPunctuator(ch) {
function isDecimalDigit (line 1304) | function isDecimalDigit(ch) {
function isHexDigit (line 1319) | function isHexDigit(ch) {
function hexToInt (line 1326) | function hexToInt(ch) {
function isOctalDigit (line 1367) | function isOctalDigit(ch) {
FILE: acorn/src/scope.js
class Scope (line 9) | class Scope {
method constructor (line 10) | constructor(flags) {
FILE: acorn/src/scopeflags.js
constant SCOPE_TOP (line 2) | const
constant SCOPE_FUNCTION (line 2) | const
constant SCOPE_ASYNC (line 2) | const
constant SCOPE_GENERATOR (line 2) | const
constant SCOPE_ARROW (line 2) | const
constant SCOPE_SIMPLE_CATCH (line 2) | const
constant SCOPE_SUPER (line 2) | const
constant SCOPE_DIRECT_SUPER (line 2) | const
constant SCOPE_CLASS_STATIC_BLOCK (line 2) | const
constant SCOPE_CLASS_FIELD_INIT (line 2) | const
constant SCOPE_SWITCH (line 2) | const
constant SCOPE_VAR (line 2) | const
function functionFlags (line 16) | function functionFlags(async, generator) {
constant BIND_NONE (line 21) | const
constant BIND_VAR (line 21) | const
constant BIND_LEXICAL (line 21) | const
constant BIND_FUNCTION (line 21) | const
constant BIND_SIMPLE_CATCH (line 21) | const
constant BIND_OUTSIDE (line 21) | const
FILE: acorn/src/state.js
class Parser (line 11) | class Parser {
method constructor (line 12) | constructor(options, input, startPos) {
method parse (line 102) | parse() {
method inFunction (line 108) | get inFunction() { return (this.currentVarScope().flags & SCOPE_FUNCTI...
method inGenerator (line 110) | get inGenerator() { return (this.currentVarScope().flags & SCOPE_GENER...
method inAsync (line 112) | get inAsync() { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 }
method canAwait (line 114) | get canAwait() {
method allowReturn (line 123) | get allowReturn() {
method allowSuper (line 129) | get allowSuper() {
method allowDirectSuper (line 134) | get allowDirectSuper() { return (this.currentThisScope().flags & SCOPE...
method treatFunctionsAsVar (line 136) | get treatFunctionsAsVar() { return this.treatFunctionsAsVarInScope(thi...
method allowNewDotTarget (line 138) | get allowNewDotTarget() {
method allowUsing (line 147) | get allowUsing() {
method inClassStaticBlock (line 154) | get inClassStaticBlock() {
method extend (line 158) | static extend(...plugins) {
method parse (line 164) | static parse(input, options) {
method parseExpressionAt (line 168) | static parseExpressionAt(input, pos, options) {
method tokenizer (line 174) | static tokenizer(input, options) {
FILE: acorn/src/statement.js
constant FUNC_STATEMENT (line 616) | const FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4
constant FUNC_HANGING_STATEMENT (line 616) | const FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4
constant FUNC_NULLABLE_ID (line 616) | const FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4
function isPrivateNameConflicted (line 898) | function isPrivateNameConflicted(privateNameMap, element) {
function checkKeyName (line 924) | function checkKeyName(node, name) {
FILE: acorn/src/tokencontext.js
class TokContext (line 9) | class TokContext {
method constructor (line 10) | constructor(token, isExpr, preserveSpace, override, generator) {
FILE: acorn/src/tokenize.js
class Token (line 13) | class Token {
method constructor (line 14) | constructor(p) {
function stringToNumber (line 492) | function stringToNumber(str, isLegacyOctalNumericLiteral) {
function stringToBigInt (line 501) | function stringToBigInt(str) {
constant INVALID_TEMPLATE_ESCAPE_ERROR (line 598) | const INVALID_TEMPLATE_ESCAPE_ERROR = {}
FILE: acorn/src/tokentype.js
class TokenType (line 24) | class TokenType {
method constructor (line 25) | constructor(label, conf = {}) {
function binop (line 39) | function binop(name, prec) {
function kw (line 49) | function kw(name, options = {}) {
FILE: acorn/src/unicode-property-data.js
function buildUnicodeData (line 58) | function buildUnicodeData(ecmaVersion) {
FILE: acorn/src/util.js
function wordsRegexp (line 13) | function wordsRegexp(words) {
function codePointToString (line 17) | function codePointToString(code) {
FILE: acorn/src/whitespace.js
function isNewLine (line 7) | function isNewLine(code) {
function nextLineBreak (line 11) | function nextLineBreak(code, from, end = code.length) {
FILE: bin/generate-identifier-regex.js
function search (line 14) | function search(arr, ch, starting) {
function esc (line 20) | function esc(code) {
function generate (line 25) | function generate(chars) {
function writeGeneratedFile (line 52) | function writeGeneratedFile(filename, content) {
FILE: bin/generate-unicode-script-values.js
function writeGeneratedFile (line 31) | function writeGeneratedFile(filename, content) {
FILE: bin/run_test262.js
function loadList (line 6) | function loadList(filename) {
FILE: test/bench/common.js
method 'Acorn (dev)' (line 27) | 'Acorn (dev)'() {
method 'Acorn' (line 35) | 'Acorn'() {
method 'Esprima' (line 43) | 'Esprima'() {
method 'TypeScript' (line 51) | 'TypeScript'() {
method 'Traceur' (line 59) | 'Traceur'() {
method 'Flow' (line 68) | 'Flow'() {
method 'Babylon' (line 76) | 'Babylon'() {
FILE: test/bench/fixtures/angular.js
function minErr (line 38) | function minErr(module, ErrorConstructor) {
function isArrayLike (line 287) | function isArrayLike(obj) {
function forEach (line 344) | function forEach(obj, iterator, context) {
function forEachSorted (line 386) | function forEachSorted(obj, iterator, context) {
function reverseParams (line 400) | function reverseParams(iteratorFn) {
function nextUid (line 414) | function nextUid() {
function setHashKey (line 424) | function setHashKey(obj, h) {
function baseExtend (line 433) | function baseExtend(dst, objs, deep) {
function extend (line 485) | function extend(dst) {
function merge (line 508) | function merge(dst) {
function toInt (line 514) | function toInt(str) {
function inherit (line 524) | function inherit(parent, extra) {
function noop (line 544) | function noop() {}
function identity (line 576) | function identity($) {return $;}
function valueFn (line 580) | function valueFn(value) {return function valueRef() {return value;};}
function hasCustomToString (line 582) | function hasCustomToString(obj) {
function isUndefined (line 599) | function isUndefined(value) {return typeof value === 'undefined';}
function isDefined (line 614) | function isDefined(value) {return typeof value !== 'undefined';}
function isObject (line 630) | function isObject(value) {
function isBlankObject (line 641) | function isBlankObject(value) {
function isString (line 658) | function isString(value) {return typeof value === 'string';}
function isNumber (line 679) | function isNumber(value) {return typeof value === 'number';}
function isDate (line 694) | function isDate(value) {
function isFunction (line 725) | function isFunction(value) {return typeof value === 'function';}
function isRegExp (line 735) | function isRegExp(value) {
function isWindow (line 747) | function isWindow(obj) {
function isScope (line 752) | function isScope(obj) {
function isFile (line 757) | function isFile(obj) {
function isFormData (line 762) | function isFormData(obj) {
function isBlob (line 767) | function isBlob(obj) {
function isBoolean (line 772) | function isBoolean(value) {
function isPromiseLike (line 777) | function isPromiseLike(obj) {
function isTypedArray (line 783) | function isTypedArray(value) {
function isArrayBuffer (line 787) | function isArrayBuffer(obj) {
function isElement (line 819) | function isElement(node) {
function makeMap (line 829) | function makeMap(str) {
function nodeName_ (line 838) | function nodeName_(element) {
function includes (line 842) | function includes(array, obj) {
function arrayRemove (line 846) | function arrayRemove(array, value) {
function copy (line 919) | function copy(source, destination) {
function equals (line 1123) | function equals(o1, o2) {
function noUnsafeEval (line 1189) | function noUnsafeEval() {
function concat (line 1254) | function concat(array1, array2, index) {
function sliceArgs (line 1258) | function sliceArgs(args, startIndex) {
function bind (line 1280) | function bind(self, fn) {
function toJsonReplacer (line 1301) | function toJsonReplacer(key, value) {
function toJson (line 1354) | function toJson(obj, pretty) {
function fromJson (line 1375) | function fromJson(json) {
function timezoneToOffset (line 1383) | function timezoneToOffset(timezone, fallback) {
function addDateMinutes (line 1392) | function addDateMinutes(date, minutes) {
function convertTimezoneToLocal (line 1399) | function convertTimezoneToLocal(date, timezone, reverse) {
function startingTag (line 1410) | function startingTag(element) {
function tryDecodeURIComponent (line 1440) | function tryDecodeURIComponent(value) {
function parseKeyValue (line 1453) | function parseKeyValue(/**string*/keyValue) {
function toKeyValue (line 1480) | function toKeyValue(obj) {
function encodeUriSegment (line 1508) | function encodeUriSegment(val) {
function encodeUriQuery (line 1527) | function encodeUriQuery(val, pctEncodeSpaces) {
function getNgAttribute (line 1539) | function getNgAttribute(element, ngAttr) {
function allowAutoBootstrap (line 1550) | function allowAutoBootstrap(document) {
function angularInit (line 1714) | function angularInit(element, bootstrap) {
function bootstrap (line 1807) | function bootstrap(element, modules, config) {
function reloadWithDebugInfo (line 1885) | function reloadWithDebugInfo() {
function getTestability (line 1898) | function getTestability(rootElement) {
function snake_case (line 1908) | function snake_case(name, separator) {
function bindJQuery (line 1916) | function bindJQuery() {
function assertArg (line 1970) | function assertArg(arg, name, reason) {
function assertArgFn (line 1977) | function assertArgFn(arg, name, acceptArrayAnnotation) {
function assertNotHasOwnProperty (line 1992) | function assertNotHasOwnProperty(name, context) {
function getter (line 2006) | function getter(obj, path, bindFnToScope) {
function getBlockNodes (line 2030) | function getBlockNodes(nodes) {
function createMap (line 2060) | function createMap() {
function stringify (line 2064) | function stringify(value) {
function setupModuleLoader (line 2101) | function setupModuleLoader(window) {
function shallowCopy (line 2462) | function shallowCopy(src, dst) {
function serializeObject (line 2484) | function serializeObject(obj) {
function toDebugString (line 2499) | function toDebugString(obj) {
function publishExternalAPI (line 2634) | function publishExternalAPI(angular) {
function jqNextId (line 2910) | function jqNextId() { return ++jqId; }
function cssKebabToCamel (line 2923) | function cssKebabToCamel(name) {
function fnCamelCaseReplace (line 2927) | function fnCamelCaseReplace(all, letter) {
function kebabToCamel (line 2935) | function kebabToCamel(name) {
function jqLiteIsTextNode (line 2960) | function jqLiteIsTextNode(html) {
function jqLiteAcceptsData (line 2964) | function jqLiteAcceptsData(node) {
function jqLiteHasData (line 2971) | function jqLiteHasData(node) {
function jqLiteCleanData (line 2978) | function jqLiteCleanData(nodes) {
function jqLiteBuildFragment (line 2984) | function jqLiteBuildFragment(html, context) {
function jqLiteParseHTML (line 3021) | function jqLiteParseHTML(html, context) {
function jqLiteWrapNode (line 3036) | function jqLiteWrapNode(node, wrapper) {
function JQLite (line 3054) | function JQLite(element) {
function jqLiteClone (line 3081) | function jqLiteClone(element) {
function jqLiteDealoc (line 3085) | function jqLiteDealoc(element, onlyDescendants) {
function jqLiteOff (line 3096) | function jqLiteOff(element, type, fn, unsupported) {
function jqLiteRemoveData (line 3134) | function jqLiteRemoveData(element, name) {
function jqLiteExpandoStore (line 3156) | function jqLiteExpandoStore(element, createIfNecessary) {
function jqLiteData (line 3169) | function jqLiteData(element, key, value) {
function jqLiteHasClass (line 3198) | function jqLiteHasClass(element, selector) {
function jqLiteRemoveClass (line 3204) | function jqLiteRemoveClass(element, cssClasses) {
function jqLiteAddClass (line 3216) | function jqLiteAddClass(element, cssClasses) {
function jqLiteAddNodes (line 3233) | function jqLiteAddNodes(root, elements) {
function jqLiteController (line 3259) | function jqLiteController(element, name) {
function jqLiteInheritedData (line 3263) | function jqLiteInheritedData(element, name, value) {
function jqLiteEmpty (line 3283) | function jqLiteEmpty(element) {
function jqLiteRemove (line 3290) | function jqLiteRemove(element, keepData) {
function jqLiteDocumentLoaded (line 3297) | function jqLiteDocumentLoaded(action, win) {
function jqLiteReady (line 3310) | function jqLiteReady(fn) {
function getBooleanAttrName (line 3374) | function getBooleanAttrName(element, name) {
function getAliasedAttrName (line 3382) | function getAliasedAttrName(name) {
function getText (line 3475) | function getText(element, value) {
function createEventHandler (line 3560) | function createEventHandler(element, events) {
function defaultHandlerWrapper (line 3612) | function defaultHandlerWrapper(element, event, handler) {
function specialMouseHandlerWrapper (line 3616) | function specialMouseHandlerWrapper(target, event, handler) {
function $$jqLiteProvider (line 3867) | function $$jqLiteProvider() {
function hashKey (line 3898) | function hashKey(obj, nextUidFn) {
function HashMap (line 3921) | function HashMap(array, isolatedUid) {
function stringifyFn (line 4035) | function stringifyFn(fn) {
function extractArgs (line 4043) | function extractArgs(fn) {
function anonFn (line 4049) | function anonFn(fn) {
function annotate (line 4059) | function annotate(fn, strictDi, name) {
function createInjector (line 4609) | function createInjector(modulesToLoad, strictDi) {
function $AnchorScrollProvider (line 4884) | function $AnchorScrollProvider() {
function mergeClasses (line 5152) | function mergeClasses(a,b) {
function extractElementNode (line 5161) | function extractElementNode(element) {
function splitClasses (line 5170) | function splitClasses(classes) {
function prepareAnimateOptions (line 5195) | function prepareAnimateOptions(options) {
function updateData (line 5246) | function updateData(data, classes, value) {
function handleCSSClassChanges (line 5261) | function handleCSSClassChanges() {
function addRemoveClassesPostDigest (line 5294) | function addRemoveClassesPostDigest(element, add, remove) {
function domInsert (line 5407) | function domInsert(element, parentElement, afterElement) {
function waitForTick (line 5807) | function waitForTick(fn) {
function next (line 5846) | function next() {
function onProgress (line 5870) | function onProgress(response) {
function AnimateRunner (line 5878) | function AnimateRunner(host) {
function run (line 6036) | function run() {
function applyAnimationContents (line 6047) | function applyAnimationContents() {
function Browser (line 6088) | function Browser(window, document, $log, $sniffer) {
function $BrowserProvider (line 6420) | function $BrowserProvider() {
function $CacheFactoryProvider (line 6509) | function $CacheFactoryProvider() {
function $TemplateCacheProvider (line 6827) | function $TemplateCacheProvider() {
function UNINITIALIZED_VALUE (line 7790) | function UNINITIALIZED_VALUE() {}
function $CompileProvider (line 7801) | function $CompileProvider($provide, $$sanitizeUriProvider) {
function SimpleChange (line 10426) | function SimpleChange(previous, current) {
function directiveNormalize (line 10440) | function directiveNormalize(name) {
function nodesetLinkingFn (line 10491) | function nodesetLinkingFn(
function directiveLinkingFn (line 10498) | function directiveLinkingFn(
function tokenDifference (line 10506) | function tokenDifference(str1, str2) {
function removeComments (line 10522) | function removeComments(jqNodes) {
function identifierForController (line 10544) | function identifierForController(controller, ident) {
function $ControllerProvider (line 10565) | function $ControllerProvider() {
function $DocumentProvider (line 10757) | function $DocumentProvider() {
function $$IsDocumentHiddenProvider (line 10769) | function $$IsDocumentHiddenProvider() {
function $ExceptionHandlerProvider (line 10834) | function $ExceptionHandlerProvider() {
function serializeValue (line 10875) | function serializeValue(v) {
function $HttpParamSerializerProvider (line 10884) | function $HttpParamSerializerProvider() {
function $HttpParamSerializerJQLikeProvider (line 10922) | function $HttpParamSerializerJQLikeProvider() {
function defaultHttpResponseTransform (line 10995) | function defaultHttpResponseTransform(data, headers) {
function isJsonLike (line 11011) | function isJsonLike(str) {
function parseHeaders (line 11022) | function parseHeaders(headers) {
function headersGetter (line 11058) | function headersGetter(headers) {
function transformData (line 11088) | function transformData(data, headers, status, fns) {
function isSuccess (line 11101) | function isSuccess(status) {
function $HttpProvider (line 11114) | function $HttpProvider() {
function $xhrFactoryProvider (line 12291) | function $xhrFactoryProvider() {
function $HttpBackendProvider (line 12317) | function $HttpBackendProvider() {
function createHttpBackend (line 12323) | function createHttpBackend($browser, createXhr, $browserDefer, callbacks...
function $InterpolateProvider (line 12534) | function $InterpolateProvider() {
function $IntervalProvider (line 12867) | function $IntervalProvider() {
function createCallback (line 13083) | function createCallback(callbackId) {
function encodePath (line 13172) | function encodePath(path) {
function parseAbsoluteUrl (line 13183) | function parseAbsoluteUrl(absoluteUrl, locationObj) {
function parseAppUrl (line 13192) | function parseAppUrl(url, locationObj) {
function startsWith (line 13214) | function startsWith(str, search) {
function stripBaseUrl (line 13225) | function stripBaseUrl(base, url) {
function stripHash (line 13232) | function stripHash(url) {
function trimEmptyHash (line 13237) | function trimEmptyHash(url) {
function stripFile (line 13242) | function stripFile(url) {
function serverBase (line 13247) | function serverBase(url) {
function LocationHtml5Url (line 13261) | function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
function LocationHashbangUrl (line 13341) | function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
function LocationHashbangInHtml5Url (line 13453) | function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
function locationGetter (line 13823) | function locationGetter(property) {
function locationGetterSetter (line 13830) | function locationGetterSetter(property, preprocess) {
function $LocationProvider (line 13878) | function $LocationProvider() {
function $LogProvider (line 14222) | function $LogProvider() {
function getStringValue (line 14371) | function getStringValue(name) {
function ifDefined (line 14948) | function ifDefined(v, d) {
function plusFn (line 14952) | function plusFn(l, r) {
function isStateless (line 14958) | function isStateless($filter, filterName) {
function findConstantAndWatchExpressions (line 14963) | function findConstantAndWatchExpressions(ast, $filter) {
function getInputs (line 15073) | function getInputs(body) {
function isAssignable (line 15081) | function isAssignable(ast) {
function assignableAST (line 15085) | function assignableAST(ast) {
function isLiteral (line 15091) | function isLiteral(ast) {
function isConstant (line 15099) | function isConstant(ast) {
function ASTCompiler (line 15103) | function ASTCompiler(astBuilder, $filter) {
function ASTInterpreter (line 15570) | function ASTInterpreter(astBuilder, $filter) {
function getValueOf (line 15964) | function getValueOf(value) {
function $ParseProvider (line 16020) | function $ParseProvider() {
function $QProvider (line 16516) | function $QProvider() {
function $$QProvider (line 16548) | function $$QProvider() {
function qFactory (line 16576) | function qFactory(nextTick, exceptionHandler, errorOnUnhandledRejections) {
function $$RAFProvider (line 16965) | function $$RAFProvider() { //rAF
function $RootScopeProvider (line 17064) | function $RootScopeProvider() {
function $$SanitizeUriProvider (line 18408) | function $$SanitizeUriProvider() {
function snakeToCamel (line 18503) | function snakeToCamel(name) {
function adjustMatcher (line 18508) | function adjustMatcher(matcher) {
function adjustMatchers (line 18536) | function adjustMatchers(matchers) {
function $SceDelegateProvider (line 18616) | function $SceDelegateProvider() {
function $SceProvider (line 19152) | function $SceProvider() {
function $SnifferProvider (line 19568) | function $SnifferProvider() {
function $TemplateRequestProvider (line 19644) | function $TemplateRequestProvider() {
function $$TestabilityProvider (line 19749) | function $$TestabilityProvider() {
function $TimeoutProvider (line 19865) | function $TimeoutProvider() {
function urlResolve (line 20017) | function urlResolve(url) {
function urlIsSameOrigin (line 20052) | function urlIsSameOrigin(requestUrl) {
function $WindowProvider (line 20100) | function $WindowProvider() {
function $$CookieReader (line 20113) | function $$CookieReader($document) {
function $$CookieReaderProvider (line 20164) | function $$CookieReaderProvider() {
function $FilterProvider (line 20275) | function $FilterProvider($provide) {
function filterFilter (line 20471) | function filterFilter() {
function createPredicateFn (line 20508) | function createPredicateFn(expression, comparator, anyPropertyKey, match...
function deepCompare (line 20545) | function deepCompare(actual, expected, comparator, anyPropertyKey, match...
function getTypeForFilter (line 20594) | function getTypeForFilter(val) {
function currencyFilter (line 20655) | function currencyFilter($locale) {
function numberFilter (line 20729) | function numberFilter($locale) {
function parse (line 20754) | function parse(numStr) {
function roundNumber (line 20809) | function roundNumber(parsedNumber, fractionSize, minFrac, maxFrac) {
function formatNumber (line 20884) | function formatNumber(number, pattern, groupSep, decimalSep, fractionSiz...
function padNumber (line 20950) | function padNumber(num, digits, trim, negWrap) {
function dateGetter (line 20969) | function dateGetter(name, size, offset, trim, negWrap) {
function dateStrGetter (line 20981) | function dateStrGetter(name, shortForm, standAlone) {
function timeZoneGetter (line 20991) | function timeZoneGetter(date, formats, offset) {
function getFirstThursdayOfYear (line 21001) | function getFirstThursdayOfYear(year) {
function getThursdayThisWeek (line 21009) | function getThursdayThisWeek(datetime) {
function weekGetter (line 21015) | function weekGetter(size) {
function ampmGetter (line 21027) | function ampmGetter(date, formats) {
function eraGetter (line 21031) | function eraGetter(date, formats) {
function longEraGetter (line 21035) | function longEraGetter(date, formats) {
function dateFilter (line 21171) | function dateFilter($locale) {
function jsonFilter (line 21278) | function jsonFilter() {
function limitToFilter (line 21408) | function limitToFilter() {
function sliceFn (line 21435) | function sliceFn(input, begin, end) {
function orderByFilter (line 21992) | function orderByFilter($parse) {
function ngDirective (line 22135) | function ngDirective(directive) {
function defaultLinkFn (line 22526) | function defaultLinkFn(scope, element, attr) {
function nullFormRenameControl (line 22630) | function nullFormRenameControl(control, name) {
function FormController (line 22678) | function FormController($element, $attrs, $scope, $animate, $interpolate) {
function getSetter (line 23160) | function getSetter(expression) {
function setupValidity (line 23176) | function setupValidity(instance) {
function addSetValidityMethod (line 23180) | function addSetValidityMethod(context) {
function isObjectEmpty (line 23267) | function isObjectEmpty(obj) {
function stringBasedInputType (line 24498) | function stringBasedInputType(ctrl) {
function textInputType (line 24504) | function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function baseInputType (line 24509) | function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function weekParser (line 24619) | function weekParser(isoWeek, existingDate) {
function createDateParser (line 24651) | function createDateParser(regexp, mapping) {
function createDateInputType (line 24701) | function createDateInputType(type, regexp, parseDate, format) {
function badInputChecker (line 24773) | function badInputChecker(scope, element, attr, ctrl) {
function numberFormatterParser (line 24784) | function numberFormatterParser(ctrl) {
function parseNumberAttrVal (line 24803) | function parseNumberAttrVal(val) {
function isNumberInteger (line 24810) | function isNumberInteger(num) {
function countDecimals (line 24818) | function countDecimals(num) {
function isValidForStep (line 24838) | function isValidForStep(viewValue, stepBase, step) {
function numberInputType (line 24857) | function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function rangeInputType (line 24904) | function rangeInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function urlInputType (line 25038) | function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function emailInputType (line 25051) | function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
function radioInputType (line 25064) | function radioInputType(scope, element, attr, ctrl) {
function parseConstantExpr (line 25095) | function parseConstantExpr($parse, context, name, expression, fallback) {
function checkboxInputType (line 25108) | function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browse...
function updateElementValue (line 25407) | function updateElementValue(element, attr, value) {
function classDirective (line 25722) | function classDirective(name, selector) {
function NgModelController (line 28019) | function NgModelController($scope, $exceptionHandler, $attr, $element, $...
function processParseErrors (line 28375) | function processParseErrors() {
function processSyncValidators (line 28395) | function processSyncValidators() {
function processAsyncValidators (line 28411) | function processAsyncValidators() {
function setValidity (line 28437) | function setValidity(name, isValid) {
function validationDone (line 28443) | function validationDone(allValid) {
function writeToModelIfNeeded (line 28525) | function writeToModelIfNeeded() {
function setupModelWatcher (line 28626) | function setupModelWatcher(ctrl) {
function setTouched (line 28935) | function setTouched() {
function ModelOptions (line 28964) | function ModelOptions(options) {
function NgModelOptionsController (line 29286) | function NgModelOptionsController($attrs, $scope) {
function defaults (line 29311) | function defaults(dst, src) {
function parseOptionsExpression (line 29601) | function parseOptionsExpression(optionsExp, selectElement, scope) {
function ngOptionsPostLink (line 29763) | function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
function updateElementText (line 30307) | function updateElementText(newText) {
function ngTranscludeCloneAttachFn (line 31695) | function ngTranscludeCloneAttachFn(clone, transcludedScope) {
function useFallbackContent (line 31706) | function useFallbackContent() {
function notWhitespace (line 31714) | function notWhitespace(nodes) {
function scheduleRender (line 31941) | function scheduleRender() {
function scheduleViewValueUpdate (line 31951) | function scheduleViewValueUpdate(renderAfter) {
function setOptionAsSelected (line 32068) | function setOptionAsSelected(optionEl) {
function selectPreLink (line 32335) | function selectPreLink(scope, element, attr, ctrls) {
function selectPostLink (line 32407) | function selectPostLink(scope, element, attrs, ctrls) {
function getDecimals (line 32835) | function getDecimals(n) {
function getVF (line 32841) | function getVF(n, opt_precision) {
FILE: test/bench/fixtures/ember.js
function missingModule (line 54) | function missingModule(name, referrerName) {
function internalRequire (line 62) | function internalRequire(_name, referrerName) {
function classCallCheck (line 115) | function classCallCheck(instance, Constructor) {
function inherits (line 121) | function inherits(subClass, superClass) {
function taggedTemplateLiteralLoose (line 138) | function taggedTemplateLiteralLoose(strings, raw) {
function defineProperties (line 143) | function defineProperties(target, props) {
function createClass (line 153) | function createClass(Constructor, protoProps, staticProps) {
function interopExportWildcard (line 159) | function interopExportWildcard(obj, defaults) {
function defaults (line 165) | function defaults(obj, defaults) {
function Container (line 191) | function Container(registry) {
function Registry (line 255) | function Registry() {
function getOwner (line 341) | function getOwner(object) {
function setOwner (line 344) | function setOwner(object, owner) {
function isSpecifierStringAbsolute (line 348) | function isSpecifierStringAbsolute(specifier) {
function isSpecifierObjectAbsolute (line 356) | function isSpecifierObjectAbsolute(specifier) {
function serializeSpecifier (line 359) | function serializeSpecifier(specifier) {
function serializeSpecifierPath (line 368) | function serializeSpecifierPath(specifier) {
function deserializeSpecifier (line 390) | function deserializeSpecifier(specifier) {
function NodeDOMTreeConstruction (line 435) | function NodeDOMTreeConstruction(doc) {
function RevisionTag (line 477) | function RevisionTag() {}
function DirtyableTag (line 491) | function DirtyableTag() {
function combineTagged (line 509) | function combineTagged(tagged) {
function combineSlice (line 519) | function combineSlice(slice) {
function combine (line 530) | function combine(tags) {
function _combine (line 540) | function _combine(tags) {
function CachedTag (line 557) | function CachedTag() {
function TagsPair (line 584) | function TagsPair(first, second) {
function TagsCombinator (line 600) | function TagsCombinator(tags) {
function UpdatableTag (line 622) | function UpdatableTag(tag) {
function ConstantTag (line 648) | function ConstantTag() {
function VolatileTag (line 661) | function VolatileTag() {
function CurrentTag (line 674) | function CurrentTag() {
function CachedReference (line 686) | function CachedReference() {
function MapperReference (line 713) | function MapperReference(reference, mapper) {
function map (line 730) | function map(reference, mapper) {
function ReferenceCache (line 736) | function ReferenceCache(reference) {
function isModified (line 782) | function isModified(value) {
function ConstReference (line 787) | function ConstReference(inner) {
function isConst (line 799) | function isConst(reference) {
function ListItem (line 806) | function ListItem(iterable, result) {
function IterationArtifacts (line 834) | function IterationArtifacts(iterable) {
function ReferenceIterator (line 916) | function ReferenceIterator(iterable) {
function IteratorSynchronizer (line 942) | function IteratorSynchronizer(_ref) {
function referenceFromParts (line 1068) | function referenceFromParts(root, parts) {
function PrimitiveReference (line 1101) | function PrimitiveReference(value){_ConstReference.call(this,value);}
function StringReference (line 1101) | function StringReference(){_PrimitiveReference.apply(this,arguments);thi...
function ValueReference (line 1101) | function ValueReference(value){_PrimitiveReference2.call(this,value);}
function ConditionalReference (line 1101) | function ConditionalReference(inner){this.inner = inner;this.tag = inner...
function Constants (line 1101) | function Constants(){ // `0` means NULL
function AppendOpcodes (line 1102) | function AppendOpcodes(){this.evaluateOpcode = _glimmerUtil.fillNulls(51...
function AbstractOpcode (line 1102) | function AbstractOpcode(){_glimmerUtil.initializeGuid(this);}
function UpdatingOpcode (line 1102) | function UpdatingOpcode(){_AbstractOpcode.apply(this,arguments);this.nex...
function Assert (line 1103) | function Assert(cache){_UpdatingOpcode.call(this);this.type = "assert";t...
function JumpIfNotModifiedOpcode (line 1103) | function JumpIfNotModifiedOpcode(tag,target){_UpdatingOpcode2.call(this)...
function DidModifyOpcode (line 1103) | function DidModifyOpcode(target){_UpdatingOpcode3.call(this);this.target...
function LabelOpcode (line 1103) | function LabelOpcode(label){this.tag = _glimmerReference.CONSTANT_TAG;th...
function CompiledPositionalArgs (line 1103) | function CompiledPositionalArgs(values){this.values = values;this.length...
function _class (line 1103) | function _class(){_CompiledPositionalArgs.call(this,EMPTY_ARRAY);}
function EvaluatedPositionalArgs (line 1103) | function EvaluatedPositionalArgs(values){this.values = values;this.tag =...
function _class2 (line 1103) | function _class2(){_EvaluatedPositionalArgs.call(this,EMPTY_ARRAY);}
function CompiledNamedArgs (line 1103) | function CompiledNamedArgs(keys,values){this.keys = keys;this.values = v...
function _class3 (line 1103) | function _class3(){_CompiledNamedArgs.call(this,EMPTY_ARRAY,EMPTY_ARRAY);}
function EvaluatedNamedArgs (line 1103) | function EvaluatedNamedArgs(keys,values){var _map=arguments.length <= 2 ...
function _class4 (line 1103) | function _class4(){_EvaluatedNamedArgs.call(this,EMPTY_ARRAY,EMPTY_ARRAY...
function CompiledArgs (line 1103) | function CompiledArgs(positional,named,blocks){this.positional = positio...
function _class5 (line 1103) | function _class5(){_CompiledArgs.call(this,COMPILED_EMPTY_POSITIONAL_ARG...
function EvaluatedArgs (line 1103) | function EvaluatedArgs(positional,named,blocks){this.positional = positi...
function UpdateComponentOpcode (line 1157) | function UpdateComponentOpcode(name,component,manager,args,dynamicScope)...
function DidUpdateLayoutOpcode (line 1157) | function DidUpdateLayoutOpcode(manager,component,bounds){_UpdatingOpcode...
function ConcreteBounds (line 1157) | function ConcreteBounds(parentNode,first,last){this.parentNode = parentN...
function SingleNodeBounds (line 1157) | function SingleNodeBounds(parentNode,node){this.parentNode = parentNode;...
function single (line 1157) | function single(parent,node){return new SingleNodeBounds(parent,node);}
function moveBounds (line 1157) | function moveBounds(bounds,reference){var parent=bounds.parentElement();...
function clear (line 1157) | function clear(bounds){var parent=bounds.parentElement();var first=bound...
function isSafeString (line 1157) | function isSafeString(value){return !!value && typeof value['toHTML'] ==...
function isNode (line 1157) | function isNode(value){return value !== null && typeof value === 'object...
function isString (line 1157) | function isString(value){return typeof value === 'string';}
function cautiousInsert (line 1157) | function cautiousInsert(dom,cursor,value){if(isString(value)){return Tex...
function trustingInsert (line 1157) | function trustingInsert(dom,cursor,value){if(isString(value)){return HTM...
function TextUpsert (line 1157) | function TextUpsert(bounds,textNode){_Upsert.call(this,bounds);this.text...
function HTMLUpsert (line 1157) | function HTMLUpsert(){_Upsert2.apply(this,arguments);}
function SafeStringUpsert (line 1157) | function SafeStringUpsert(bounds,lastStringValue){_Upsert3.call(this,bou...
function NodeUpsert (line 1157) | function NodeUpsert(){_Upsert4.apply(this,arguments);}
function isComponentDefinition (line 1157) | function isComponentDefinition(obj){return typeof obj === 'object' && ob...
function CompiledExpression (line 1157) | function CompiledExpression(){}
function ClassList (line 1157) | function ClassList(){this.list = null;this.isConst = true;}
function ClassListReference (line 1157) | function ClassListReference(list){_CachedReference.call(this);this.list ...
function toClassName (line 1157) | function toClassName(list){var ret=[];for(var i=0;i < list.length;i++) {...
function SimpleElementOperations (line 1157) | function SimpleElementOperations(env){this.env = env;this.opcodes = null...
function ComponentElementOperations (line 1157) | function ComponentElementOperations(env){this.env = env;this.attributeNa...
function UpdateModifierOpcode (line 1157) | function UpdateModifierOpcode(manager,modifier,args){_UpdatingOpcode6.ca...
function StaticAttribute (line 1157) | function StaticAttribute(element,name,value,namespace){this.element = el...
function DynamicAttribute (line 1157) | function DynamicAttribute(element,attributeManager,name,reference,namesp...
function formatElement (line 1157) | function formatElement(element){return JSON.stringify('<' + element.tagN...
function PatchElementOpcode (line 1157) | function PatchElementOpcode(operation){_UpdatingOpcode7.call(this);this....
function First (line 1157) | function First(node){this.node = node;}
function Last (line 1157) | function Last(node){this.node = node;}
function Fragment (line 1157) | function Fragment(bounds){this.bounds = bounds;}
function ElementStack (line 1157) | function ElementStack(env,parentNode,nextSibling){this.constructing = nu...
function SimpleBlockTracker (line 1159) | function SimpleBlockTracker(parent){this.parent = parent;this.first = nu...
function RemoteBlockTracker (line 1159) | function RemoteBlockTracker(){_SimpleBlockTracker.apply(this,arguments);}
function UpdatableBlockTracker (line 1159) | function UpdatableBlockTracker(){_SimpleBlockTracker2.apply(this,argumen...
function BlockListTracker (line 1159) | function BlockListTracker(parent,boundList){this.parent = parent;this.bo...
function CompiledValue (line 1159) | function CompiledValue(value){_CompiledExpression.call(this);this.type =...
function CompiledHasBlock (line 1159) | function CompiledHasBlock(inner){_CompiledExpression2.call(this);this.in...
function CompiledHasBlockParams (line 1159) | function CompiledHasBlockParams(inner){_CompiledExpression3.call(this);t...
function CompiledGetBlockBySymbol (line 1159) | function CompiledGetBlockBySymbol(symbol,debug){this.symbol = symbol;thi...
function CompiledInPartialGetBlock (line 1159) | function CompiledInPartialGetBlock(symbol,name){this.symbol = symbol;thi...
function CompiledProgram (line 1159) | function CompiledProgram(start,end,symbols){_CompiledBlock.call(this,sta...
function Labels (line 1159) | function Labels(){this.labels = _glimmerUtil.dict();this.jumps = [];this...
function BasicOpcodeBuilder (line 1159) | function BasicOpcodeBuilder(symbolTable,env,program){this.symbolTable = ...
function isCompilableExpression (line 1166) | function isCompilableExpression(expr){return expr && typeof expr['compil...
function OpcodeBuilder (line 1166) | function OpcodeBuilder(symbolTable,env){var program=arguments.length <= ...
function compileLayout (line 1173) | function compileLayout(compilable,env){var builder=new ComponentLayoutBu...
function ComponentLayoutBuilder (line 1173) | function ComponentLayoutBuilder(env){this.env = env;}
function WrappedBuilder (line 1173) | function WrappedBuilder(env,layout){this.env = env;this.layout = layout;...
function isOpenElement (line 1200) | function isOpenElement(value){var type=value[0];return type === _glimmer...
function UnwrappedBuilder (line 1200) | function UnwrappedBuilder(env,layout){this.env = env;this.layout = layou...
function ComponentTagBuilder (line 1200) | function ComponentTagBuilder(){this.isDynamic = null;this.isStatic = nul...
function ComponentAttrsBuilder (line 1200) | function ComponentAttrsBuilder(){this.buffer = [];}
function ComponentBuilder (line 1200) | function ComponentBuilder(builder){this.builder = builder;this.env = bui...
function builder (line 1200) | function builder(env,symbolTable){return new OpcodeBuilder(symbolTable,e...
function entryPoint (line 1200) | function entryPoint(meta){return new ProgramSymbolTable(meta);}
function layout (line 1200) | function layout(meta,wireNamed,wireYields,hasPartials){var _symbols3=sym...
function block (line 1200) | function block(parent,locals){var localsMap=null;var program=parent['pro...
function symbols (line 1200) | function symbols(named,yields,hasPartials){var yieldsMap=null;var namedM...
function ProgramSymbolTable (line 1200) | function ProgramSymbolTable(meta){var named=arguments.length <= 1 || arg...
function BlockSymbolTable (line 1200) | function BlockSymbolTable(parent,program,locals){this.parent = parent;th...
function Specialize (line 1200) | function Specialize(){this.names = _glimmerUtil.dict();this.funcs = [];}
function compileStatement (line 1200) | function compileStatement(statement,builder){var refined=SPECIALIZE.spec...
function Layout (line 1200) | function Layout(){_Template.apply(this,arguments);}
function EntryPoint (line 1200) | function EntryPoint(){_Template2.apply(this,arguments);this.compiled = n...
function InlineBlock (line 1200) | function InlineBlock(){_Template3.apply(this,arguments);this.compiled = ...
function PartialBlock (line 1200) | function PartialBlock(){_Template4.apply(this,arguments);this.compiled =...
function Scanner (line 1200) | function Scanner(block,meta,env){this.block = block;this.meta = meta;thi...
function scanBlock (line 1200) | function scanBlock(_ref26,symbolTable,env){var statements=_ref26.stateme...
function defaultBlock (line 1200) | function defaultBlock(sexp){return sexp[4];}
function inverseBlock (line 1200) | function inverseBlock(sexp){return sexp[5];}
function params (line 1200) | function params(sexp){return sexp[2];}
function hash (line 1200) | function hash(sexp){return sexp[3];}
function RawInlineBlock (line 1200) | function RawInlineBlock(env,table,statements){this.env = env;this.table ...
function CompiledLookup (line 1200) | function CompiledLookup(base,path){_CompiledExpression4.call(this);this....
function CompiledSelf (line 1200) | function CompiledSelf(){_CompiledExpression5.apply(this,arguments);}
function CompiledSymbol (line 1200) | function CompiledSymbol(symbol,debug){_CompiledExpression6.call(this);th...
function CompiledInPartialName (line 1200) | function CompiledInPartialName(symbol,name){_CompiledExpression7.call(th...
function CompiledHelper (line 1200) | function CompiledHelper(name,helper,args,symbolTable){_CompiledExpressio...
function CompiledConcat (line 1200) | function CompiledConcat(parts){this.parts = parts;this.type = "concat";}
function ConcatReference (line 1200) | function ConcatReference(parts){_CachedReference2.call(this);this.parts ...
function castToString (line 1200) | function castToString(value){if(typeof value['toString'] !== 'function')...
function CompiledFunctionExpression (line 1200) | function CompiledFunctionExpression(func,symbolTable){_CompiledExpressio...
function debugCallback (line 1200) | function debugCallback(context,get){console.info('Use `context`, and `ge...
function getter (line 1200) | function getter(vm,builder){return function(path){var parts=path.split('...
function setDebuggerCallback (line 1201) | function setDebuggerCallback(cb){callback = cb;}
function resetDebuggerCallback (line 1201) | function resetDebuggerCallback(){callback = debugCallback;}
function Compilers (line 1201) | function Compilers(){this.names = _glimmerUtil.dict();this.funcs = [];}
function expr (line 1201) | function expr(expression,builder){if(Array.isArray(expression)){return E...
function compileArgs (line 1201) | function compileArgs(params,hash,builder){var compiledParams=compilePara...
function compileBlockArgs (line 1201) | function compileBlockArgs(params,hash,blocks,builder){var compiledParams...
function compileBaselineArgs (line 1201) | function compileBaselineArgs(args,builder){var params=args[0];var hash=a...
function compileParams (line 1201) | function compileParams(params,builder){if(!params || params.length === 0...
function compileHash (line 1201) | function compileHash(hash,builder){if(!hash)return COMPILED_EMPTY_NAMED_...
function compileRef (line 1201) | function compileRef(parts,builder){var head=parts[0];var local=undefined...
function Blocks (line 1201) | function Blocks(){this.names = _glimmerUtil.dict();this.funcs = [];}
function Inlines (line 1202) | function Inlines(){this.names = _glimmerUtil.dict();this.funcs = [];}
function populateBuiltins (line 1205) | function populateBuiltins(){var blocks=arguments.length <= 0 || argument...
function has (line 1261) | function has(array,item){return array.indexOf(item) !== -1;}
function checkURI (line 1261) | function checkURI(tagName,attribute){return (tagName === null || has(bad...
function checkDataURI (line 1261) | function checkDataURI(tagName,attribute){if(tagName === null)return fals...
function requiresSanitization (line 1261) | function requiresSanitization(tagName,attribute){return checkURI(tagName...
function sanitizeAttributeValue (line 1261) | function sanitizeAttributeValue(env,element,attribute,value){var tagName...
function normalizeProperty (line 1266) | function normalizeProperty(element,slotName){var type=undefined,normaliz...
function preferAttr (line 1280) | function preferAttr(tagName,propName){var tag=ATTR_OVERRIDES[tagName.toU...
function domChanges (line 1287) | function domChanges(document,DOMChangesClass){if(!document)return DOMCha...
function treeConstruction (line 1287) | function treeConstruction(document,DOMTreeConstructionClass){if(!documen...
function fixInnerHTML (line 1287) | function fixInnerHTML(parent,wrapper,div,html,reference){var wrappedHtml...
function shouldApplyFix (line 1287) | function shouldApplyFix(document){var table=document.createElement('tabl...
function domChanges$1 (line 1299) | function domChanges$1(document,DOMChangesClass,svgNamespace){if(!documen...
function treeConstruction$1 (line 1299) | function treeConstruction$1(document,TreeConstructionClass,svgNamespace)...
function fixSVG (line 1299) | function fixSVG(parent,div,html,reference){ // IE, Edge: also do not cor...
function shouldApplyFix$1 (line 1301) | function shouldApplyFix$1(document,svgNamespace){var svg=document.create...
function domChanges$2 (line 1317) | function domChanges$2(document,DOMChangesClass){if(!document)return DOMC...
function treeConstruction$2 (line 1317) | function treeConstruction$2(document,TreeConstructionClass){if(!document...
function shouldApplyFix$2 (line 1317) | function shouldApplyFix$2(document){var mergingTextDiv=document.createEl...
function isWhitespace (line 1324) | function isWhitespace(string){return WHITESPACE.test(string);}
function moveNodesBefore (line 1324) | function moveNodesBefore(source,target,nextSibling){var first=source.fir...
function TreeConstruction (line 1324) | function TreeConstruction(document){this.document = document;this.setupU...
function DOMChanges (line 1327) | function DOMChanges(document){this.document = document;this.namespace = ...
function _insertHTMLBefore (line 1330) | function _insertHTMLBefore(_useless,_parent,_nextSibling,html){ // TypeS...
function isDocumentFragment (line 1339) | function isDocumentFragment(node){return node.nodeType === Node.DOCUMENT...
function defaultManagers (line 1339) | function defaultManagers(element,attr,_isTrusting,_namespace){var tagNam...
function defaultPropertyManagers (line 1339) | function defaultPropertyManagers(tagName,attr){if(requiresSanitization(t...
function defaultAttributeManagers (line 1339) | function defaultAttributeManagers(tagName,attr){if(requiresSanitization(...
function readDOMAttr (line 1339) | function readDOMAttr(element,attr){var isSVG=element.namespaceURI === SV...
function AttributeManager (line 1339) | function AttributeManager(attr){this.attr = attr;}
function PropertyManager (line 1339) | function PropertyManager(){_AttributeManager.apply(this,arguments);}
function normalizeAttributeValue (line 1342) | function normalizeAttributeValue(value){if(value === false || value === ...
function isAttrRemovalValue (line 1343) | function isAttrRemovalValue(value){return value === null || value === un...
function SafePropertyManager (line 1343) | function SafePropertyManager(){_PropertyManager.apply(this,arguments);}
function isUserInputValue (line 1343) | function isUserInputValue(tagName,attribute){return (tagName === 'INPUT'...
function InputValuePropertyManager (line 1343) | function InputValuePropertyManager(){_AttributeManager2.apply(this,argum...
function isOptionSelected (line 1343) | function isOptionSelected(tagName,attribute){return tagName === 'OPTION'...
function OptionSelectedManager (line 1343) | function OptionSelectedManager(){_PropertyManager2.apply(this,arguments);}
function SafeAttributeManager (line 1343) | function SafeAttributeManager(){_AttributeManager3.apply(this,arguments);}
function Scope (line 1343) | function Scope(references){var callerScope=arguments.length <= 1 || argu...
function Transaction (line 1343) | function Transaction(){this.scheduledInstallManagers = [];this.scheduled...
function Opcode (line 1343) | function Opcode(array){this.array = array;this.offset = 0;}
function Program (line 1343) | function Program(){this.opcodes = [];this._offset = 0;this._opcode = new...
function Environment (line 1343) | function Environment(_ref28){var appendOperations=_ref28.appendOperation...
function RenderResult (line 1343) | function RenderResult(env,updating,bounds){this.env = env;this.updating ...
function Frame (line 1343) | function Frame(start,end){var component=arguments.length <= 2 || argumen...
function FrameStack (line 1343) | function FrameStack(){this.frames = [];this.frame = -1;}
function VM (line 1345) | function VM(env,scope,dynamicScope,elementStack){this.env = env;this.ele...
function UpdatingVM (line 1355) | function UpdatingVM(env,_ref30){var _ref30$alwaysRevalidate=_ref30.alway...
function BlockOpcode (line 1355) | function BlockOpcode(start,end,state,bounds,children){_UpdatingOpcode8.c...
function TryOpcode (line 1355) | function TryOpcode(start,end,state,bounds,children){_BlockOpcode.call(th...
function ListRevalidationDelegate (line 1355) | function ListRevalidationDelegate(opcode,marker){this.opcode = opcode;th...
function ListBlockOpcode (line 1355) | function ListBlockOpcode(start,end,state,bounds,children,artifacts){_Blo...
function UpdatingVMFrame (line 1356) | function UpdatingVMFrame(vm,ops,exceptionHandler){this.vm = vm;this.ops ...
function isEmpty (line 1356) | function isEmpty(value){return value === null || value === undefined || ...
function normalizeTextValue (line 1356) | function normalizeTextValue(value){if(isEmpty(value)){return '';}return ...
function normalizeTrustedValue (line 1356) | function normalizeTrustedValue(value){if(isEmpty(value)){return '';}if(i...
function normalizeValue (line 1356) | function normalizeValue(value){if(isEmpty(value)){return '';}if(isString...
function AppendDynamicOpcode (line 1356) | function AppendDynamicOpcode(){}
function GuardedAppendOpcode (line 1356) | function GuardedAppendOpcode(expression,symbolTable){_AppendDynamicOpcod...
function IsComponentDefinitionReference (line 1404) | function IsComponentDefinitionReference(){_ConditionalReference.apply(th...
function UpdateOpcode (line 1404) | function UpdateOpcode(cache,bounds,upsert){_UpdatingOpcode9.call(this);t...
function GuardedUpdateOpcode (line 1404) | function GuardedUpdateOpcode(reference,cache,bounds,upsert,appendOpcode,...
function OptimizedCautiousAppendOpcode (line 1438) | function OptimizedCautiousAppendOpcode(){_AppendDynamicOpcode2.apply(thi...
function OptimizedCautiousUpdateOpcode (line 1438) | function OptimizedCautiousUpdateOpcode(){_UpdateOpcode2.apply(this,argum...
function GuardedCautiousAppendOpcode (line 1438) | function GuardedCautiousAppendOpcode(){_GuardedAppendOpcode.apply(this,a...
function GuardedCautiousUpdateOpcode (line 1438) | function GuardedCautiousUpdateOpcode(){_GuardedUpdateOpcode.apply(this,a...
function OptimizedTrustingAppendOpcode (line 1438) | function OptimizedTrustingAppendOpcode(){_AppendDynamicOpcode3.apply(thi...
function OptimizedTrustingUpdateOpcode (line 1438) | function OptimizedTrustingUpdateOpcode(){_UpdateOpcode3.apply(this,argum...
function GuardedTrustingAppendOpcode (line 1438) | function GuardedTrustingAppendOpcode(){_GuardedAppendOpcode2.apply(this,...
function GuardedTrustingUpdateOpcode (line 1438) | function GuardedTrustingUpdateOpcode(){_GuardedUpdateOpcode2.apply(this,...
function lookupPartial (line 1438) | function lookupPartial(name){var normalized=String(name);if(!env.hasPart...
function IterablePresenceReference (line 1438) | function IterablePresenceReference(artifacts){this.tag = artifacts.tag;t...
function TemplateIterator (line 1438) | function TemplateIterator(vm){this.vm = vm;}
function templateFactory (line 1438) | function templateFactory(_ref38){var templateId=_ref38.id;var meta=_ref3...
function template (line 1438) | function template(block,id,meta,env){var scanner=new Scanner(block,meta,...
function DynamicVarReference (line 1438) | function DynamicVarReference(scope,nameRef){this.scope = scope;this.name...
function getDynamicVar (line 1438) | function getDynamicVar(vm,args,_symbolTable){var scope=vm.dynamicScope()...
method NodeType (line 1438) | get NodeType(){return NodeType;}
function getAttrNamespace (line 1472) | function getAttrNamespace(attrName) {
function unwrap (line 1477) | function unwrap(val) {
function expect (line 1481) | function expect(val, message) {
function unreachable (line 1485) | function unreachable() {
function debugAssert (line 1492) | function debugAssert(test, msg) {
function NullConsole (line 1511) | function NullConsole() {}
function Logger (line 1527) | function Logger(_ref) {
function assign (line 1589) | function assign(obj) {
function fillNulls (line 1601) | function fillNulls(count) {
function initializeGuid (line 1610) | function initializeGuid(object) {
function ensureGuid (line 1613) | function ensureGuid(object) {
function EmptyObject (line 1626) | function EmptyObject() {}
function dict (line 1628) | function dict() {
function DictSet (line 1637) | function DictSet() {
function Stack (line 1666) | function Stack() {
function LinkedList (line 1701) | function LinkedList() {
function ListSlice (line 1821) | function ListSlice(head, tail) {
function is (line 1973) | function is(variant) {
function isPrimitiveValue (line 1988) | function isPrimitiveValue(value) {
function isAttribute (line 2015) | function isAttribute(val) {
function isArgument (line 2019) | function isArgument(val) {
function isParameter (line 2023) | function isParameter(val) {
function getParameterName (line 2027) | function getParameterName(s) {
function each (line 2042) | function each(collection, callback) {
function isString (line 2048) | function isString(suspect) {
function isFunction (line 2052) | function isFunction(suspect) {
function isNumber (line 2056) | function isNumber(suspect) {
function isCoercableNumber (line 2060) | function isCoercableNumber(number) {
function binarySearch (line 2064) | function binarySearch(time, timers) {
function Queue (line 2088) | function Queue(name, options, globalOptions) {
function DeferredActionQueues (line 2325) | function DeferredActionQueues(queueNames, options) {
function noSuchQueue (line 2336) | function noSuchQueue(name) {
function noSuchMethod (line 2340) | function noSuchMethod(name) {
function Backburner (line 2387) | function Backburner(queueNames, options) {
function fn (line 2763) | function fn() {
function getOnError (line 3007) | function getOnError(options) {
function createAutorun (line 3011) | function createAutorun(backburner) {
function findDebouncee (line 3020) | function findDebouncee(target, method, debouncees) {
function findThrottler (line 3024) | function findThrottler(target, method, throttlers) {
function findItem (line 3028) | function findItem(target, method, collection) {
function clearItems (line 3043) | function clearItems(item) {
function Container (line 3080) | function Container(registry, options) {
function wrapManagerInDeprecationProxy (line 3227) | function wrapManagerInDeprecationProxy(manager) {
function isSingleton (line 3316) | function isSingleton(container, fullName) {
function isInstantiatable (line 3320) | function isInstantiatable(container, fullName) {
function lookup (line 3324) | function lookup(container, fullName) {
function isSingletonClass (line 3358) | function isSingletonClass(container, fullName, _ref2) {
function isSingletonInstance (line 3365) | function isSingletonInstance(container, fullName, _ref3) {
function isFactoryClass (line 3372) | function isFactoryClass(container, fullname, _ref4) {
function isFactoryInstance (line 3379) | function isFactoryInstance(container, fullName, _ref5) {
function instantiateFactory (line 3386) | function instantiateFactory(container, fullName, options) {
function markInjectionsAsDynamic (line 3412) | function markInjectionsAsDynamic(injections) {
function areInjectionsDynamic (line 3416) | function areInjectionsDynamic(injections) {
function buildInjections (line 3420) | function buildInjections() /* container, ...injections */{
function deprecatedFactoryFor (line 3454) | function deprecatedFactoryFor(container, fullName) {
function injectionsFor (line 3513) | function injectionsFor(container, fullName) {
function instantiate (line 3523) | function instantiate(factory, props, container, fullName) {
function factoryInjectionsFor (line 3581) | function factoryInjectionsFor(container, fullName) {
function injectDeprecatedContainer (line 3610) | function injectDeprecatedContainer(object, container) {
function destroyDestroyables (line 3617) | function destroyDestroyables(container) {
function resetCache (line 3631) | function resetCache(container) {
function resetMember (line 3636) | function resetMember(container, fullName) {
function buildFakeContainerWithDeprecations (line 3650) | function buildFakeContainerWithDeprecations(container) {
function buildFakeContainerFunction (line 3664) | function buildFakeContainerFunction(container, containerProperty, ownerP...
function DeprecatedFactoryManager (line 3676) | function DeprecatedFactoryManager(container, factory, fullName) {
function FactoryManager (line 3694) | function FactoryManager(container, factory, fullName, normalizedName) {
function Registry (line 3842) | function Registry(options) {
function deprecateResolverFunction (line 4506) | function deprecateResolverFunction(registry) {
function expandLocalLookup (line 4548) | function expandLocalLookup(registry, normalizedName, normalizedSource) {
function resolve (line 4567) | function resolve(registry, normalizedName, options) {
function has (line 4606) | function has(registry, fullName, source) {
function privatize (line 4613) | function privatize(_ref) {
function DAG (line 4639) | function DAG() {
function Vertices (line 4692) | function Vertices() {
function IntStack (line 4830) | function IntStack() {
function handleReset (line 5971) | function handleReset() {
function commonSetupRegistry (line 6270) | function commonSetupRegistry(registry) {
function registerLibraries (line 6293) | function registerLibraries() {
function logLibraryVersions (line 6303) | function logLibraryVersions() {
function getEngineParent (line 6574) | function getEngineParent(engine) {
function setEngineParent (line 6587) | function setEngineParent(engine, parent) {
function props (line 6600) | function props(obj) {
function resolverFor (line 6969) | function resolverFor(namespace) {
function buildInitializerMethod (line 6977) | function buildInitializerMethod(bucketName, humanName) {
function commonSetupRegistry (line 6997) | function commonSetupRegistry(registry) {
function validateType (line 7490) | function validateType(resolvedType, parsedName) {
function K (line 7511) | function K() {}
function consoleMethod (line 7513) | function consoleMethod(name) {
function assertPolyfill (line 7536) | function assertPolyfill(test, message) {
function registerHandler (line 7691) | function registerHandler(handler) {
function formatMessage (line 7695) | function formatMessage(_message, options) {
function deprecate (line 7804) | function deprecate(message, test, options) {
function EmberError (line 7848) | function EmberError(message) {
function isEnabled (line 7917) | function isEnabled(feature) {
function registerHandler (line 7940) | function registerHandler(type, callback) {
function invoke (line 7948) | function invoke(type, message, test, options) {
function _warnIfUsingStrippedFeatureFlags (line 8178) | function _warnIfUsingStrippedFeatureFlags(FEATURES, knownFeatures, featu...
function getDebugFunction (line 8243) | function getDebugFunction(name) {
function setDebugFunction (line 8247) | function setDebugFunction(name, fn) {
function assert (line 8251) | function assert() {
function info (line 8255) | function info() {
function warn (line 8259) | function warn() {
function debug (line 8263) | function debug() {
function deprecate (line 8267) | function deprecate() {
function deprecateFunc (line 8271) | function deprecateFunc() {
function runInDebug (line 8275) | function runInDebug() {
function debugSeal (line 8279) | function debugSeal() {
function debugFreeze (line 8283) | function debugFreeze() {
function isTesting (line 8297) | function isTesting() {
function setTesting (line 8301) | function setTesting(value) {
function registerHandler (line 8340) | function registerHandler(handler) {
function warn (line 8380) | function warn(message, test, options) {
function checkGlobal (line 8410) | function checkGlobal(value) {
function checkElementIdShadowing (line 8415) | function checkElementIdShadowing(value) {
function defaultTrue (line 8555) | function defaultTrue(v) {
function defaultFalse (line 8559) | function defaultFalse(v) {
function normalizeExtendPrototypes (line 8563) | function normalizeExtendPrototypes(obj) {
function recordUpdated (line 8861) | function recordUpdated(updatedRecord) {
function onChange (line 8955) | function onChange() {
function canSetTypeOfInput (line 11129) | function canSetTypeOfInput(type) {
function Environment (line 11269) | function Environment(_ref) {
function StyleAttributeManager (line 11576) | function StyleAttributeManager() {
function helper (line 11740) | function helper(helperFn) {
function classHelper (line 11752) | function classHelper(_ref) {
function htmlSafe (line 11783) | function htmlSafe(_ref) {
function inputTypeHelper (line 11797) | function inputTypeHelper(_ref) {
function normalizeClass (line 11815) | function normalizeClass(_ref) {
function NOOP (line 12140) | function NOOP(args) {
function makeArgsProcessor (line 12144) | function makeArgsProcessor(valuePathRef, actionArgsRef) {
function makeDynamicClosureAction (line 12176) | function makeDynamicClosureAction(context, targetRef, actionRef, process...
function makeClosureAction (line 12187) | function makeClosureAction(context, target, action, processArgs, debugKe...
function ClosureComponentReference (line 12364) | function ClosureComponentReference(args, symbolTable, env) {
function createCurriedDefinition (line 12423) | function createCurriedDefinition(definition, args) {
function curryArgs (line 12438) | function curryArgs(definition, newArgs) {
function concat (line 12524) | function concat(_ref) {
function isEachIn (line 12651) | function isEachIn(ref) {
function GetHelperReference (line 12729) | function GetHelperReference(sourceReference, pathReference) {
function ConditionalHelperReference (line 12901) | function ConditionalHelperReference(cond, truthy, falsy) {
function inlineIf (line 12950) | function inlineIf(vm, _ref) {
function inlineUnless (line 12984) | function inlineUnless(vm, _ref2) {
function locHelper (line 13036) | function locHelper(_ref) {
function log (line 13062) | function log(_ref) {
function isMut (line 13159) | function isMut(ref) {
function unMut (line 13163) | function unMut(ref) {
function queryParams (line 13220) | function queryParams(_ref) {
function makeBoundHelper (line 13671) | function makeBoundHelper(fn) {
function isAllowedEvent (line 13682) | function isAllowedEvent(event, allowedKeys) {
function ActionState (line 13727) | function ActionState(element, actionId, actionName, actionArgs, namedArg...
function ActionModifierManager (line 13837) | function ActionModifierManager() {
function installProtocolForURL (line 13915) | function installProtocolForURL(environment) {
function browserProtocolForURL (line 13943) | function browserProtocolForURL(url) {
function nodeProtocolForURL (line 13952) | function nodeProtocolForURL(url) {
function DynamicScope (line 13966) | function DynamicScope(view, outletState, rootOutletState, targetObject) {
function RootState (line 13993) | function RootState(root, env, template, self, parentElement, dynamicScop...
function register (line 14076) | function register(renderer) {
function deregister (line 14081) | function deregister(renderer) {
function loopBegin (line 14087) | function loopBegin() {
function K (line 14093) | function K() {}
function loopEnd (line 14096) | function loopEnd(current, next) {
function Renderer (line 14116) | function Renderer(env, rootTemplate) {
function InertRenderer (line 14371) | function InertRenderer() {
function InteractiveRenderer (line 14397) | function InteractiveRenderer() {
function setupApplicationRegistry (line 14430) | function setupApplicationRegistry(registry) {
function setupEngineRegistry (line 14462) | function setupEngineRegistry(registry) {
function refineInlineSyntax (line 14490) | function refineInlineSyntax(path, params, hash, builder) {
function refineBlockSyntax (line 14515) | function refineBlockSyntax(sexp, builder) {
function registerMacros (line 14557) | function registerMacros(macro) {
function populateMacros (line 14561) | function populateMacros(blocks, inlines) {
function _inElementMacro (line 14593) | function _inElementMacro(sexp, builder) {
function textAreaMacro (line 14613) | function textAreaMacro(path, params, hash, builder) {
function _withDynamicVarsMacro (line 14629) | function _withDynamicVarsMacro(sexp, builder) {
function processComponentInitializationAssertions (line 14672) | function processComponentInitializationAssertions(component, props) {
function validatePositionalParameters (line 14707) | function validatePositionalParameters(named, positional, positionalParam...
function aliasIdToElementId (line 14731) | function aliasIdToElementId(args, props) {
function applyAttributeBindings (line 14741) | function applyAttributeBindings(element, attributeBindings, component, o...
function NOOP (line 14767) | function NOOP() {}
function ComponentStateBucket (line 14770) | function ComponentStateBucket(environment, component, args, finalizer) {
function initialRenderInstrumentDetails (line 14803) | function initialRenderInstrumentDetails(component) {
function rerenderInstrumentDetails (line 14807) | function rerenderInstrumentDetails(component) {
function CurlyComponentManager (line 14814) | function CurlyComponentManager() {
function TopComponentManager (line 15064) | function TopComponentManager() {
function tagName (line 15108) | function tagName(vm) {
function ariaRole (line 15114) | function ariaRole(vm) {
function CurlyComponentDefinition (line 15121) | function CurlyComponentDefinition(name, ComponentClass, template, args) {
function RootComponentDefinition (line 15137) | function RootComponentDefinition(instance) {
function CurlyComponentLayoutCompiler (line 15156) | function CurlyComponentLayoutCompiler(template) {
function dynamicComponentFor (line 15182) | function dynamicComponentFor(vm, symbolTable) {
function closureComponentMacro (line 15190) | function closureComponentMacro(path, params, hash, _default, inverse, bu...
function dynamicComponentMacro (line 15197) | function dynamicComponentMacro(params, hash, _default, inverse, builder) {
function blockComponentMacro (line 15204) | function blockComponentMacro(sexp, builder) {
function inlineComponentMacro (line 15216) | function inlineComponentMacro(path, params, hash, builder) {
function DynamicComponentReference (line 15224) | function DynamicComponentReference(_ref) {
function buildTextFieldSyntax (line 15274) | function buildTextFieldSyntax(params, hash, builder) {
function inputMacro (line 15413) | function inputMacro(path, params, hash, builder) {
function dynamicEngineFor (line 15461) | function dynamicEngineFor(vm, symbolTable) {
function mountMacro (line 15490) | function mountMacro(path, params, hash, builder) {
function DynamicEngineReference (line 15502) | function DynamicEngineReference(_ref) {
function MountManager (line 15545) | function MountManager() {
function MountDefinition (line 15618) | function MountDefinition(name) {
function outletComponentFor (line 15636) | function outletComponentFor(vm) {
function outletMacro (line 15702) | function outletMacro(path, params, hash, builder) {
function OutletComponentReference (line 15712) | function OutletComponentReference(outletNameRef, parentOutletStateRef) {
function revalidate (line 15751) | function revalidate(definition, lastState, newState) {
function instrumentationPayload (line 15767) | function instrumentationPayload(_ref) {
function NOOP (line 15775) | function NOOP() {}
function StateBucket (line 15778) | function StateBucket(outletState) {
function OutletComponentManager (line 15802) | function OutletComponentManager() {
function TopLevelOutletComponentManager (line 15870) | function TopLevelOutletComponentManager() {
function TopLevelOutletComponentDefinition (line 15898) | function TopLevelOutletComponentDefinition(instance) {
function TopLevelOutletLayoutCompiler (line 15912) | function TopLevelOutletLayoutCompiler(template) {
function OutletComponentDefinition (line 15933) | function OutletComponentDefinition(outletName, template) {
function OutletLayoutCompiler (line 15946) | function OutletLayoutCompiler(template) {
function makeComponentDefinition (line 15972) | function makeComponentDefinition(vm) {
function renderMacro (line 16077) | function renderMacro(path, params, hash, builder) {
function AbstractRenderManager (line 16090) | function AbstractRenderManager() {
function SingletonRenderManager (line 16144) | function SingletonRenderManager() {
function NonSingletonRenderManager (line 16177) | function NonSingletonRenderManager() {
function RenderDefinition (line 16226) | function RenderDefinition(name, template, env, manager) {
function template (line 16244) | function template(json) {
function setTemplates (line 16269) | function setTemplates(templates) {
function getTemplates (line 16273) | function getTemplates() {
function getTemplate (line 16277) | function getTemplate(name) {
function hasTemplate (line 16283) | function hasTemplate(name) {
function setTemplate (line 16287) | function setTemplate(name, template) {
function referenceForKey (line 16321) | function referenceForKey(component, key) {
function referenceForParts (line 16325) | function referenceForParts(component, parts) {
function wrapComponentClassAttribute (line 16342) | function wrapComponentClassAttribute(hash) {
function StyleBindingReference (line 16418) | function StyleBindingReference(inner, isVisible) {
function SimpleClassNameBindingReference (line 16490) | function SimpleClassNameBindingReference(inner, path) {
function ColonClassNameBindingReference (line 16522) | function ColonClassNameBindingReference(inner, truthy, falsy) {
function TemplateElement (line 16559) | function TemplateElement() {
function EngineElement (line 16571) | function EngineElement() {
function DebugStack (line 16581) | function DebugStack() {
function iterableFor (line 16644) | function iterableFor(ref, keyPath) {
function keyForEachIn (line 16652) | function keyForEachIn(keyPath) {
function keyForArray (line 16667) | function keyForArray(keyPath) {
function index (line 16682) | function index(item, index) {
function identity (line 16686) | function identity(item) {
function ensureUniqueKey (line 16696) | function ensureUniqueKey(seen, key) {
function ArrayIterator (line 16710) | function ArrayIterator(array, keyFor) {
function EmberArrayIterator (line 16748) | function EmberArrayIterator(array, keyFor) {
function ObjectKeysIterator (line 16786) | function ObjectKeysIterator(keys, values, keyFor) {
function EmptyIterator (line 16824) | function EmptyIterator() {
function EachInIterable (line 16842) | function EachInIterable(ref, keyFor) {
function ArrayIterable (line 16902) | function ArrayIterable(ref, keyFor) {
function gatherArgs (line 16975) | function gatherArgs(args, definition) {
function gatherNamedMap (line 16981) | function gatherNamedMap(args, definition) {
function gatherPositionalValues (line 16990) | function gatherPositionalValues(args, definition) {
function mergeArgs (line 17003) | function mergeArgs(namedMap, positionalValues, blocks, componentClass) {
function ComponentArgs (line 17038) | function ComponentArgs(namedArgs) {
function mergeRestArg (line 17080) | function mergeRestArg(namedMap, positionalValues, restArgName) {
function mergePositionalParams (line 17086) | function mergePositionalParams(namedMap, values, positionalParamNames) {
function MutableCell (line 17099) | function MutableCell(ref, value) {
function EmberPathReference (line 17127) | function EmberPathReference() {
function CachedReference (line 17146) | function CachedReference() {
function RootReference (line 17178) | function RootReference(value) {
function _class (line 17204) | function _class(tag, key, ref) {
function PropertyReference (line 17242) | function PropertyReference() {
function RootPropertyReference (line 17268) | function RootPropertyReference(parentValue, propertyKey) {
function NestedPropertyReference (line 17310) | function NestedPropertyReference(parentReference, propertyKey) {
function UpdatableReference (line 17371) | function UpdatableReference(value) {
function UpdatablePrimitiveReference (line 17401) | function UpdatablePrimitiveReference() {
function ConditionalReference (line 17433) | function ConditionalReference(reference) {
function SimpleHelperReference (line 17503) | function SimpleHelperReference(helper, args) {
function ClassBasedHelperReference (line 17546) | function ClassBasedHelperReference(instance, args) {
function InternalHelperReference (line 17583) | function InternalHelperReference(helper, args) {
function UnboundReference (line 17610) | function UnboundReference() {
function SafeString (line 17651) | function SafeString(string) {
function getSafeString (line 17670) | function getSafeString() {
function escapeChar (line 17695) | function escapeChar(chr) {
function escapeExpression (line 17699) | function escapeExpression(string) {
function htmlSafe (line 17738) | function htmlSafe(str) {
function isHTMLSafe (line 17765) | function isHTMLSafe(str) {
function toBool (line 17774) | function toBool(predicate) {
function OutletStateReference (line 17798) | function OutletStateReference(outletView) {
function OrphanedOutletStateReference (line 17831) | function OrphanedOutletStateReference(root, name) {
function ChildOutletStateReference (line 17864) | function ChildOutletStateReference(parent, key) {
function _class (line 17888) | function _class() {
function OutletView (line 17919) | function OutletView(_environment, renderer, owner, template) {
function alias (line 17981) | function alias(altKey) {
function AliasedProperty (line 17988) | function AliasedProperty(altKey) {
function AliasedProperty_readOnlySet (line 18050) | function AliasedProperty_readOnlySet(obj, keyName, value) {
function AliasedProperty_oneWaySet (line 18054) | function AliasedProperty_oneWaySet(obj, keyName, value) {
function Binding (line 18078) | function Binding(toPath, fromPath) {
function fireDeprecations (line 18351) | function fireDeprecations(obj, toPath, fromPath, deprecateGlobal, deprec...
function mixinProperties (line 18374) | function mixinProperties(to, from) {
function bind (line 18551) | function bind(obj, to, from) {
function Cache (line 18561) | function Cache(limit, func, key, store) {
function DefaultStore (line 18621) | function DefaultStore() {
function firstKey (line 18649) | function firstKey(path) {
function isObject (line 18653) | function isObject(obj) {
function isVolatile (line 18657) | function isVolatile(obj) {
function ChainWatchers (line 18662) | function ChainWatchers() {
function makeChainWatcher (line 18751) | function makeChainWatcher() {
function addChainWatcher (line 18755) | function addChainWatcher(obj, keyName, node) {
function removeChainWatcher (line 18761) | function removeChainWatcher(obj, keyName, node, _meta) {
function ChainNode (line 18785) | function ChainNode(parent, key, value) {
function lazyGet (line 18980) | function lazyGet(obj, key) {
function finishChains (line 19004) | function finishChains(meta) {
function ComputedProperty (line 19136) | function ComputedProperty(config, opts) {
function addArg (line 19254) | function addArg(property) {
function computed (line 19535) | function computed(func) {
function cacheFor (line 19566) | function cacheFor(obj, key) {
function addDependentKeys (line 19653) | function addDependentKeys(desc, obj, keyName, meta) {
function removeDependentKeys (line 19672) | function removeDependentKeys(desc, obj, keyName, meta) {
function deprecateProperty (line 19711) | function deprecateProperty(object, deprecatedKey, newKey, options) {
function descriptor (line 19735) | function descriptor(desc) {
function Descriptor (line 19751) | function Descriptor(desc) {
function getOnerror (line 19791) | function getOnerror() {
function setOnerror (line 19797) | function setOnerror(handler) {
function dispatchError (line 19804) | function dispatchError(error) {
function getDispatchOverride (line 19814) | function getDispatchOverride() {
function setDispatchOverride (line 19818) | function setDispatchOverride(handler) {
function defaultDispatch (line 19822) | function defaultDispatch(error) {
function indexOf (line 19869) | function indexOf(array, target, method) {
function accumulateListeners (line 19883) | function accumulateListeners(obj, eventName, otherActions) {
function addListener (line 19922) | function addListener(obj, eventName, target, method, once) {
function removeListener (line 19962) | function removeListener(obj, eventName, target, method) {
function suspendListener (line 19996) | function suspendListener(obj, eventName, target, method, callback) {
function suspendListeners (line 20014) | function suspendListeners(obj, eventNames, target, method, callback) {
function watchedEvents (line 20031) | function watchedEvents(obj) {
function sendEvent (line 20051) | function sendEvent(obj, eventName, params, actions) {
function hasListeners (line 20104) | function hasListeners(obj, eventName) {
function listenersFor (line 20121) | function listenersFor(obj, eventName) {
function on (line 20164) | function on() {
function expandProperties (line 20215) | function expandProperties(pattern, callback) {
function getProperties (line 20298) | function getProperties(obj) {
function InjectedProperty (line 20444) | function InjectedProperty(type, name) {
function injectedPropertyGet (line 20452) | function injectedPropertyGet(keyName) {
function populateListeners (line 20537) | function populateListeners(name) {
function instrument (line 20574) | function instrument(name, _payload, callback, binding) {
function withFinalizer (line 20605) | function withFinalizer(callback, finalizer, payload, binding) {
function NOOP (line 20618) | function NOOP() {}
function _instrumentStart (line 20622) | function _instrumentStart(name, _payload, _payloadParam) {
function subscribe (line 20685) | function subscribe(pattern, object) {
function unsubscribe (line 20724) | function unsubscribe(subscriber) {
function reset (line 20745) | function reset() {
function isBlank (line 20780) | function isBlank(obj) {
function isEmpty (line 20816) | function isEmpty(obj) {
function isNone (line 20874) | function isNone(obj) {
function isPresent (line 20914) | function isPresent(obj) {
function isProxy (line 20923) | function isProxy(value) {
function Libraries (line 20946) | function Libraries() {
function missingFunction (line 21037) | function missingFunction(fn) {
function missingNew (line 21041) | function missingNew(name) {
function copyNull (line 21045) | function copyNull(obj) {
function copyMap (line 21056) | function copyMap(original, newObject) {
function OrderedSet (line 21077) | function OrderedSet() {
function Map (line 21257) | function Map() {
function MapWithDefault (line 21440) | function MapWithDefault(options) {
function merge (line 21526) | function merge(original, updates) {
function Meta (line 21615) | function Meta(obj, parentMeta) {
function ownMap (line 21909) | function ownMap(name, Meta) {
function inheritedMap (line 21922) | function inheritedMap(name, Meta) {
function ownCustomObject (line 21975) | function ownCustomObject(name, Meta) {
function inheritedCustomObject (line 21995) | function inheritedCustomObject(name, Meta) {
function memberProperty (line 22016) | function memberProperty(name) {
function capitalize (line 22022) | function capitalize(name) {
function deleteMeta (line 22140) | function deleteMeta(obj) {
function meta (line 22170) | function meta(obj) {
function pushUniqueListener (line 22358) | function pushUniqueListener(destination, source, index) {
function isMethod (line 22390) | function isMethod(obj) {
function mixinProperties (line 22396) | function mixinProperties(mixinsMeta, mixin) {
function concatenatedMixinProperties (line 22411) | function concatenatedMixinProperties(concatProp, props, values, base) {
function giveDescriptorSuper (line 22420) | function giveDescriptorSuper(meta, key, property, values, descs, base) {
function giveMethodSuper (line 22458) | function giveMethodSuper(obj, key, method, values, descs) {
function applyConcatenatedProperties (line 22479) | function applyConcatenatedProperties(obj, key, value, values) {
function applyMergedProperties (line 22509) | function applyMergedProperties(obj, key, value, values) {
function addNormalizedProperty (line 22548) | function addNormalizedProperty(base, key, value, meta, descs, values, co...
function mergeMixins (line 22576) | function mergeMixins(mixins, meta, descs, values, base, keys) {
function detectBinding (line 22625) | function detectBinding(key) {
function connectBindings (line 22635) | function connectBindings(obj, meta) {
function finishPartial (line 22655) | function finishPartial(obj, meta) {
function followAlias (line 22660) | function followAlias(obj, desc, descs, values) {
function updateObserversAndListeners (line 22678) | function updateObserversAndListeners(obj, key, observerOrListener, paths...
function replaceObserversAndListeners (line 22688) | function replaceObserversAndListeners(obj, key, observerOrListener) {
function applyMixin (line 22704) | function applyMixin(obj, mixins, partial) {
function mixin (line 22773) | function mixin(obj) {
function Mixin (line 22844) | function Mixin(mixins, properties) {
function hasUnprocessedMixins (line 22932) | function hasUnprocessedMixins() {
function clearUnprocessedMixins (line 22936) | function clearUnprocessedMixins() {
function _detect (line 22991) | function _detect(curMixin, targetMixin, seen) {
function _keys (line 23043) | function _keys(ret, mixin, seen) {
function required (line 23086) | function required() {
function Alias (line 23091) | function Alias(methodName) {
function aliasMethod (line 23121) | function aliasMethod(methodName) {
function observer (line 23151) | function observer() {
function _immediateObserver (line 23212) | function _immediateObserver() {
function _beforeObserver (line 23240) | function _beforeObserver() {
function changeEvent (line 23296) | function changeEvent(keyName) {
function beforeEvent (line 23300) | function beforeEvent(keyName) {
function addObserver (line 23314) | function addObserver(obj, _path, target, method) {
function observersFor (line 23321) | function observersFor(obj, path) {
function removeObserver (line 23335) | function removeObserver(obj, path, target, method) {
function _addBeforeObserver (line 23353) | function _addBeforeObserver(obj, path, target, method) {
function _suspendObserver (line 23365) | function _suspendObserver(obj, path, target, method, callback) {
function _suspendObservers (line 23369) | function _suspendObservers(obj, paths, target, method, callback) {
function _removeBeforeObserver (line 23385) | function _removeBeforeObserver(obj, path, target, method) {
function ObserverSet (line 23415) | function ObserverSet() {
function isGlobal (line 23524) | function isGlobal(path) {
function isGlobalPath (line 23528) | function isGlobalPath(path) {
function hasThis (line 23532) | function hasThis(path) {
function isPath (line 23536) | function isPath(path) {
function getFirstKey (line 23540) | function getFirstKey(path) {
function getTailPath (line 23544) | function getTailPath(path) {
function Descriptor (line 23574) | function Descriptor() {
function MANDATORY_SETTER_FUNCTION (line 23598) | function MANDATORY_SETTER_FUNCTION(name) {
function DEFAULT_GETTER_FUNCTION (line 23612) | function DEFAULT_GETTER_FUNCTION(name) {
function INHERITING_GETTER_FUNCTION (line 23619) | function INHERITING_GETTER_FUNCTION(name) {
function defineProperty (line 23682) | function defineProperty(obj, keyName, desc, data, meta) {
function _hasCachedComputedProperties (line 23770) | function _hasCachedComputedProperties() {
function didDefineComputedProperty (line 23774) | function didDefineComputedProperty(constructor) {
function handleBrokenPhantomDefineProperty (line 23785) | function handleBrokenPhantomDefineProperty(obj, keyName, desc) {
function propertyWillChange (line 23821) | function propertyWillChange(obj, keyName, _meta) {
function propertyDidChange (line 23860) | function propertyDidChange(obj, keyName, _meta) {
function dependentKeysWillChange (line 23903) | function dependentKeysWillChange(obj, depKey, meta) {
function dependentKeysDidChange (line 23925) | function dependentKeysDidChange(obj, depKey, meta) {
function iterDeps (line 23946) | function iterDeps(method, obj, depKey, seen, meta) {
function chainsWillChange (line 23978) | function chainsWillChange(obj, keyName, meta) {
function chainsDidChange (line 23985) | function chainsDidChange(obj, keyName, meta) {
function overrideChains (line 23992) | function overrideChains(obj, keyName, meta) {
function beginPropertyChanges (line 24004) | function beginPropertyChanges() {
function endPropertyChanges (line 24012) | function endPropertyChanges() {
function changeProperties (line 24036) | function changeProperties(callback, binding) {
function notifyBeforeObservers (line 24045) | function notifyBeforeObservers(obj, keyName, meta) {
function notifyObservers (line 24062) | function notifyObservers(obj, keyName, meta) {
function get (line 24138) | function get(obj, keyName) {
function _getPath (line 24166) | function _getPath(root, path) {
function isGettable (line 24185) | function isGettable(obj) {
function getWithDefault (line 24210) | function getWithDefault(root, key, defaultValue) {
function set (line 24246) | function set(obj, keyName, value, tolerant) {
function setPath (line 24313) | function setPath(root, path, value, tolerant) {
function trySet (line 24356) | function trySet(root, path, value) {
function replace (line 24366) | function replace(array, idx, amt, objects) {
function onBegin (line 24398) | function onBegin(current) {
function onEnd (line 24402) | function onEnd(current, next) {
method onerror (line 24407) | get onerror() {
method onerror (line 24410) | set onerror(handler) {
function run (line 24461) | function run() {
function setProperties (line 25103) | function setProperties(obj, properties) {
function setHasViews (line 25132) | function setHasViews(fn) {
function makeTag (line 25136) | function makeTag() {
function tagForProperty (line 25140) | function tagForProperty(object, propertyKey, _meta) {
function tagFor (line 25159) | function tagFor(object, _meta) {
function markObjectAsDirty (line 25168) | function markObjectAsDirty(meta, propertyKey) {
function K (line 25189) | function K() {}
function ensureRunloop (line 25191) | function ensureRunloop() {
function watchKey (line 25307) | function watchKey(obj, keyName, meta) {
function unwatchKey (line 25383) | function unwatchKey(obj, keyName, _meta) {
function chainsFor (line 25455) | function chainsFor(obj, meta) {
function makeChainNode (line 25459) | function makeChainNode(obj) {
function watchPath (line 25463) | function watchPath(obj, keyPath, meta) {
function unwatchPath (line 25478) | function unwatchPath(obj, keyPath, meta) {
function watch (line 25518) | function watch(obj, _keyPath, m) {
function isWatching (line 25528) | function isWatching(obj, key) {
function watcherCount (line 25536) | function watcherCount(obj, key) {
function unwatch (line 25541) | function unwatch(obj, _keyPath, m) {
function destroy (line 25560) | function destroy(obj) {
function isObject (line 25572) | function isObject(value) {
function WeakMap (line 25590) | function WeakMap(iterable) {
function delegateToConcreteImplementation (line 26254) | function delegateToConcreteImplementation(methodName) {
function detectImplementation (line 26281) | function detectImplementation(options) {
function getHistoryPath (line 26340) | function getHistoryPath(rootURL, location) {
function getHashPath (line 26387) | function getHashPath(rootURL, location) {
function getPath (line 26939) | function getPath(location) {
function getQuery (line 26955) | function getQuery(location) {
function getHash (line 26970) | function getHash(location) {
function getFullPath (line 26981) | function getFullPath(location) {
function getOrigin (line 26985) | function getOrigin(location) {
function supportsHashChange (line 27010) | function supportsHashChange(documentMode, global) {
function supportsHistory (line 27023) | function supportsHistory(userAgent, history) {
function replacePath (line 27045) | function replacePath(location, path) {
function numberOfContextsAcceptedByHandler (line 27225) | function numberOfContextsAcceptedByHandler(handler, handlerInfos) {
function controllerFor (line 27298) | function controllerFor(container, controllerName, lookupOptions) {
function DSL (line 27313) | function DSL(name, options) {
function canNest (line 27490) | function canNest(dsl) {
function getFullName (line 27494) | function getFullName(dsl, name, resetNamespace) {
function createRoute (line 27502) | function createRoute(dsl, name, options, callback) {
function generateControllerFactory (line 27539) | function generateControllerFactory(owner, controllerName, context) {
function generateController (line 27565) | function generateController(owner, controllerName) {
function K (line 27595) | function K() {
function defaultSerialize (line 27599) | function defaultSerialize(model, params) {
function hasDefaultSerialize (line 27624) | function hasDefaultSerialize(route) {
function parentRoute (line 29547) | function parentRoute(route) {
function handlerInfoFor (line 29552) | function handlerInfoFor(route, handlerInfos) {
function buildRenderOptions (line 29568) | function buildRenderOptions(route, namePassed, isDefaultRender, _name, o...
function getFullQueryParams (line 29637) | function getFullQueryParams(router, state) {
function getQueryParamsFor (line 29649) | function getQueryParamsFor(route, state) {
function copyDefaultValue (line 29675) | function copyDefaultValue(value) {
function mergeEachQueryParams (line 29687) | function mergeEachQueryParams(controllerQP, routeQP) {
function addQueryParamsObservers (line 29730) | function addQueryParamsObservers(controller, propNames) {
function getEngineRouteName (line 29736) | function getEngineRouteName(engine, routeName) {
function K (line 29757) | function K() {
function forEachRouteAbove (line 30785) | function forEachRouteAbove(originRoute, handlerInfos, callback) {
function logError (line 30874) | function logError(_error, initialMessage) {
function findRouteSubstateName (line 30912) | function findRouteSubstateName(route, state) {
function findRouteStateName (line 30935) | function findRouteStateName(route, state) {
function routeHasBeenDefined (line 30959) | function routeHasBeenDefined(owner, router, localName, fullName) {
function triggerEvent (line 30965) | function triggerEvent(handlerInfos, ignoreFailure, args) {
function calculatePostTransitionState (line 31007) | function calculatePostTransitionState(emberRouter, leafRouteName, contex...
function updatePaths (line 31026) | function updatePaths(router) {
function intersectionMatches (line 31117) | function intersectionMatches(a1, a2) {
function didBeginTransition (line 31148) | function didBeginTransition(transition, router) {
function resemblesURL (line 31171) | function resemblesURL(str) {
function forEachQueryParam (line 31175) | function forEachQueryParam(router, handlerInfos, queryParams, callback) {
function findLiveRoute (line 31189) | function findLiveRoute(liveRoutes, name) {
function appendLiveRoute (line 31206) | function appendLiveRoute(liveRoutes, defaultParentState, renderOptions) {
function appendOrphan (line 31245) | function appendOrphan(liveRoutes, into, myState) {
function representEmptyRoute (line 31261) | function representEmptyRoute(liveRoutes, defaultParentState, route) {
function shallowEqual (line 31325) | function shallowEqual(a, b) {
function routeArgs (line 31352) | function routeArgs(targetRouteName, models, queryParams) {
function getActiveTargetName (line 31362) | function getActiveTargetName(router) {
function stashParamNames (line 31367) | function stashParamNames(router, handlerInfos) {
function _calculateCacheValuePrefix (line 31397) | function _calculateCacheValuePrefix(prefix, part) {
function calculateCacheKey (line 31425) | function calculateCacheKey(prefix, parts, values) {
function normalizeControllerQueryParams (line 31479) | function normalizeControllerQueryParams(queryParams) {
function accumulateQueryParamDescriptors (line 31489) | function accumulateQueryParamDescriptors(_desc, accum) {
function resemblesURL (line 31520) | function resemblesURL(str) {
function prefixRouteNameArg (line 31530) | function prefixRouteNameArg(route, args) {
function spaceship (line 31584) | function spaceship(a, b) {
function compare (line 31631) | function compare(v, w) {
function expandPropertiesToArray (line 31718) | function expandPropertiesToArray(predicateName, properties) {
function generateComputedWithPredicate (line 31735) | function generateComputedWithPredicate(name, predicate) {
function empty (line 31789) | function empty(dependentKey) {
function notEmpty (line 31821) | function notEmpty(dependentKey) {
function none (line 31856) | function none(dependentKey) {
function not (line 31888) | function not(dependentKey) {
function bool (line 31922) | function bool(dependentKey) {
function match (line 31958) | function match(dependentKey, regexp) {
function equal (line 31995) | function equal(dependentKey, value) {
function gt (line 32030) | function gt(dependentKey, value) {
function gte (line 32065) | function gte(dependentKey, value) {
function lt (line 32100) | function lt(dependentKey, value) {
function lte (line 32135) | function lte(dependentKey, value) {
function oneWay (line 32285) | function oneWay(dependentKey) {
function readOnly (line 32337) | function readOnly(dependentKey) {
function deprecatingAlias (line 32371) | function deprecatingAlias(dependentKey, options) {
function reduceMacro (line 32407) | function reduceMacro(dependentKey, callback, initialValue) {
function arrayMacro (line 32423) | function arrayMacro(dependentKey, callback) {
function multiArrayMacro (line 32443) | function multiArrayMacro(dependentKeys, callback) {
function sum (line 32467) | function sum(dependentKey) {
function max (line 32515) | function max(dependentKey) {
function min (line 32563) | function min(dependentKey) {
function map (line 32604) | function map(dependentKey, callback) {
function mapBy (line 32641) | function mapBy(dependentKey, propertyKey) {
function filter (line 32709) | function filter(dependentKey, callback) {
function filterBy (line 32743) | function filterBy(dependentKey, propertyKey, value) {
function uniq (line 32790) | function uniq() {
function uniqBy (line 32845) | function uniqBy(dependentKey, propertyKey) {
function intersect (line 32927) | function intersect() {
function setDiff (line 32997) | function setDiff(setAProperty, setBProperty) {
function collect (line 33046) | function collect() {
function sort (line 33133) | function sort(itemsKey, sortDefinition) {
function customSort (line 33143) | function customSort(itemsKey, comparator) {
function propertySort (line 33155) | function propertySort(itemsKey, sortPropertiesKey) {
function normalizeSortProperties (line 33208) | function normalizeSortProperties(sortProperties) {
function sortByNormalizedSortProperties (line 33221) | function sortByNormalizedSortProperties(items, normalizedSortProperties) {
function controllerInjectionHelper (line 33257) | function controllerInjectionHelper(factory) {
function _copy (line 33301) | function _copy(obj, deep, seen, copies) {
function copy (line 33380) | function copy(obj, deep) {
function onerrorDefault (line 33568) | function onerrorDefault(reason) {
function errorFor (line 33575) | function errorFor(reason) {
function unwrapErrorThrown (line 33594) | function unwrapErrorThrown(reason) {
function inject (line 33827) | function inject() {
function createInjectionHelper (line 33847) | function createInjectionHelper(type, validator) {
function validatePropertyInjections (line 33866) | function validatePropertyInjections(factory) {
function isEqual (line 33933) | function isEqual(a, b) {
function contentPropertyWillChange (line 33953) | function contentPropertyWillChange(content, contentKey) {
function contentPropertyDidChange (line 33961) | function contentPropertyDidChange(content, contentKey) {
function ProxyTag (line 33972) | function ProxyTag(proxy) {
function deprecateUnderscoreActions (line 34258) | function deprecateUnderscoreActions(factory) {
function arrayObserversHelper (line 34292) | function arrayObserversHelper(obj, target, opts, operation, notify) {
function addArrayObserver (line 34311) | function addArrayObserver(array, target, opts) {
function removeArrayObserver (line 34315) | function removeArrayObserver(array, target, opts) {
function objectAt (line 34319) | function objectAt(content, idx) {
function arrayContentWillChange (line 34327) | function arrayContentWillChange(array, startIdx, removeAmt, addAmt) {
function arrayContentDidChange (line 34367) | function arrayContentDidChange(array, startIdx, removeAmt, addAmt) {
function isEmberArray (line 34420) | function isEmberArray(obj) {
function emberA (line 35196) | function emberA() {
function popCtx (line 35202) | function popCtx() {
function pushCtx (line 35206) | function pushCtx(ctx) {
function iter (line 35211) | function iter(key, value) {
function removeAt (line 36498) | function removeAt(array, start, len) {
function tap (line 37396) | function tap(proxy, promise) {
function promiseAlias (line 37577) | function promiseAlias(name) {
function registryAlias (line 37797) | function registryAlias(name) {
function buildFakeRegistryWithDeprecations (line 37805) | function buildFakeRegistryWithDeprecations(instance, typeForMessage) {
function buildFakeRegistryFunction (line 37827) | function buildFakeRegistryFunction(instance, typeForMessage, deprecatedP...
function args (line 37936) | function args(options, actionName) {
function getTarget (line 37974) | function getTarget(instance) {
function setStrings (line 38016) | function setStrings(strings) {
function getStrings (line 38020) | function getStrings() {
function get (line 38024) | function get(name) {
function K (line 38044) | function K() {
function makeCtor (line 38416) | function makeCtor() {
function injectedPropertyAssertion (line 38777) | function injectedPropertyAssertion() {
function EachProxy (line 39233) | function EachProxy(content) {
function addObserverForContentKey (line 39322) | function addObserverForContentKey(content, keyName, proxy, idx, loc) {
function removeObserverForContentKey (line 39333) | function removeObserverForContentKey(content, keyName, proxy, idx, loc) {
function onLoad (line 39381) | function onLoad(name, callback) {
function runLoadHooks (line 39403) | function runLoadHooks(name, object) {
function isSearchDisabled (line 39431) | function isSearchDisabled() {
function setSearchDisabled (line 39435) | function setSearchDisabled(flag) {
function processNamespace (line 39512) | function processNamespace(paths, root, seen) {
function isUppercase (line 39553) | function isUppercase(code) {
function tryIsNamespace (line 39558) | function tryIsNamespace(lookup, prop) {
function findNamespaces (line 39567) | function findNamespaces() {
function superClassString (line 39586) | function superClassString(mixin) {
function calculateToString (line 39596) | function calculateToString(target) {
function classToString (line 39617) | function classToString() {
function processAllNamespaces (line 39626) | function processAllNamespaces() {
function _fmt (line 40084) | function _fmt(str, formats) {
function fmt (line 40104) | function fmt(str, formats) {
function loc (line 40109) | function loc(str, formats) {
function w (line 40118) | function w(str) {
function decamelize (line 40122) | function decamelize(str) {
function dasherize (line 40126) | function dasherize(str) {
function camelize (line 40130) | function camelize(str) {
function classify (line 40134) | function classify(str) {
function underscore (line 40138) | function underscore(str) {
function capitalize (line 40142) | function capitalize(str) {
function isArray (line 40375) | function isArray(obj) {
function typeOf (line 40452) | function typeOf(item) {
function K (line 40481) | function K() {
function focus (line 40568) | function focus(el) {
function fireEvent (line 40591) | function fireEvent(element, type) {
function buildBasicEvent (line 40617) | function buildBasicEvent(type) {
function buildMouseEvent (line 40626) | function buildMouseEvent(type) {
function buildKeyboardEvent (line 40640) | function buildKeyboardEvent(type) {
function protoWrap (line 40795) | function protoWrap(proto, name, callback, isAsync) {
function helper (line 40811) | function helper(app, name) {
function andThen (line 40895) | function andThen(app, callback) {
function click (line 40927) | function click(app, selector, context) {
function currentPath (line 40969) | function currentPath(app) {
function currentRouteName (line 40998) | function currentRouteName(app) {
function currentURL (line 41031) | function currentURL(app) {
function fillIn (line 41064) | function fillIn(app, selector, contextOrText, text) {
function find (line 41117) | function find(app, selector, context) {
function findWithAssert (line 41157) | function findWithAssert(app, selector, context) {
function keyEvent (line 41190) | function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) {
function resumeTest (line 41226) | function resumeTest() {
function pauseTest (line 41248) | function pauseTest() {
function triggerEvent (line 41290) | function triggerEvent(app, selector, contextOrType, typeOrOptions, possi...
function visit (line 41359) | function visit(app, url) {
function wait (line 41419) | function wait(app, value) {
function setupForTesting (line 41510) | function setupForTesting() {
function testCheckboxClick (line 41548) | function testCheckboxClick(handler) {
function getAdapter (line 41664) | function getAdapter() {
function setAdapter (line 41668) | function setAdapter(value) {
function asyncStart (line 41677) | function asyncStart() {
function asyncEnd (line 41683) | function asyncEnd() {
function adapterDispatch (line 41689) | function adapterDispatch(error) {
function registerHelper (line 41735) | function registerHelper(name, helperMethod) {
function registerAsyncHelper (line 41784) | function registerAsyncHelper(name, helperMethod) {
function unregisterHelper (line 41805) | function unregisterHelper(name) {
function onInjectHelpers (line 41844) | function onInjectHelpers(callback) {
function invokeInjectHelpersCallbacks (line 41848) | function invokeInjectHelpersCallbacks(app) {
function pendingRequests (line 41863) | function pendingRequests() {
function clearPendingRequests (line 41867) | function clearPendingRequests() {
function incrementPendingRequests (line 41871) | function incrementPendingRequests(_, xhr) {
function decrementPendingRequests (line 41875) | function decrementPendingRequests(_, xhr) {
function TestPromise (line 41896) | function TestPromise() {
function promise (line 41934) | function promise(resolver, label) {
function resolve (line 41951) | function resolve(result, label) {
function getLastPromise (line 41955) | function getLastPromise() {
function isolate (line 41965) | function isolate(onFulfillment, result) {
function run (line 41993) | function run(fn) {
function registerWaiter (line 42044) | function registerWaiter(context, callback) {
function unregisterWaiter (line 42068) | function unregisterWaiter(context, callback) {
function checkWaiters (line 42098) | function checkWaiters() {
function indexOf (line 42112) | function indexOf(context, callback) {
function generateDeprecatedWaitersArray (line 42121) | function generateDeprecatedWaitersArray() {
function applyStr (line 42146) | function applyStr(t, m, a) {
function assign (line 42189) | function assign(original) {
function makeDictionary (line 42217) | function makeDictionary(parent) {
function uuid (line 42249) | function uuid() {
function generateGuid (line 42323) | function generateGuid(obj, prefix) {
function guidFor (line 42359) | function guidFor(obj) {
function inspect (line 42489) | function inspect(obj) {
function intern (line 42576) | function intern(str) {
function canInvoke (line 42612) | function canInvoke(obj, methodName) {
function tryInvoke (line 42637) | function tryInvoke(obj, methodName, args) {
function lookupDescriptor (line 42648) | function lookupDescriptor(obj, keyName) {
function makeArray (line 42693) | function makeArray(obj) {
function getOwner (line 42758) | function getOwner(object) {
function setOwner (line 42774) | function setOwner(object, owner) {
function ROOT (line 42810) | function ROOT() {}
function hasSuper (line 42814) | function hasSuper(func) {
function wrap (line 42834) | function wrap(func, superFunc) {
function _wrap (line 42845) | function _wrap(func, superFunc) {
function symbol (line 42867) | function symbol(debugName) {
function isNone (line 42881) | function isNone(obj) {
function toString (line 42890) | function toString(obj) {
function validateAction (line 43011) | function validateAction(component, actionName) {
function sendAction (line 43559) | function sendAction(eventName, view, event) {
function K (line 43607) | function K() {
function Attrs (line 43618) | function Attrs(oldAttrs, newAttrs, message) {
function ActionManager (line 44141) | function ActionManager() {}
function parseUnderscoredName (line 44474) | function parseUnderscoredName(templateName) {
function lookupPartial (line 44483) | function lookupPartial(templateName, owner) {
function hasPartial (line 44495) | function hasPartial(name, owner) {
function templateFor (line 44503) | function templateFor(owner, underscored, name) {
function isSimpleClick (line 44542) | function isSimpleClick(event) {
function constructStyleDeprecationMessage (line 44549) | function constructStyleDeprecationMessage(affectedStyle) {
function getRootViews (line 44559) | function getRootViews(owner) {
function getViewId (line 44581) | function getViewId(view) {
function getViewElement (line 44597) | function getViewElement(view) {
function initViewElement (line 44601) | function initViewElement(view) {
function setViewElement (line 44605) | function setViewElement(view, element) {
function getChildViews (line 44617) | function getChildViews(view) {
function initChildViews (line 44623) | function initChildViews(view) {
function addChildView (line 44627) | function addChildView(parent, child) {
function collectChildViews (line 44631) | function collectChildViews(view, registry) {
function getViewBounds (line 44655) | function getViewBounds(view) {
function getViewRange (line 44665) | function getViewRange(view) {
function getViewClientRects (line 44687) | function getViewClientRects(view) {
function getViewBoundingClientRect (line 44704) | function getViewBoundingClientRect(view) {
function matches (line 44721) | function matches(el, selector) {
function lookupComponentPair (line 44732) | function lookupComponentPair(componentLookup, owner, name, options) {
function lookupComponent (line 44745) | function lookupComponent(owner, name, options) {
function cloneStates (line 44852) | function cloneStates(from) {
function deprecatedEmberK (line 45267) | function deprecatedEmberK() {
function BackburnerAlias (line 45301) | function BackburnerAlias(args) {
function isGenerator (line 45585) | function isGenerator(mixin) {
function applyMixins (line 45589) | function applyMixins(TestClass) {
function buildOwner (line 45621) | function buildOwner() {
function getDescriptor (line 45681) | function getDescriptor(obj, path) {
function confirmExport (line 45695) | function confirmExport(Ember, assert, path, moduleId, exportName) {
function normalizeInnerHTML (line 45730) | function normalizeInnerHTML(actualHTML) {
function equalInnerHTML (line 45744) | function equalInnerHTML(fragment, html) {
function generateTokens (line 45754) | function generateTokens(containerOrHTML) {
function normalizeTokens (line 45768) | function normalizeTokens(tokens) {
function equalTokens (line 45784) | function equalTokens(actualContainer, expectedHTML) {
function setProperties (line 45806) | function setProperties(object, properties) {
function factory (line 45816) | function factory() {
function isMatcher (line 45909) | function isMatcher(obj) {
function equalsAttr (line 45913) | function equalsAttr(expected) {
function regex (line 45925) | function regex(r) {
function classes (line 45937) | function classes(expected) {
function styles (line 45950) | function styles(expected) {
function equalsElement (line 45975) | function equalsElement(element, tagName, attributes, content) {
function moduleFor (line 46016) | function moduleFor(description, TestClass) {
function runAppend (line 46061) | function runAppend(view) {
function runDestroy (line 46065) | function runDestroy(toDestroy) {
function strip (line 46076) | function strip(_ref) {
function AbstractApplicationTestCase (line 46098) | function AbstractApplicationTestCase() {
function AbstractRenderingTestCase (line 46211) | function AbstractRenderingTestCase() {
function isMarker (line 46357) | function isMarker(node) {
function AbstractTestCase (line 46370) | function AbstractTestCase() {
function ApplicationTestCase (line 46537) | function ApplicationTestCase() {
function QueryParamTestCase (line 46554) | function QueryParamTestCase() {
function RenderingTestCase (line 46677) | function RenderingTestCase() {
function RouterTestCase (line 46700) | function RouterTestCase() {
function testBoth (line 46734) | function testBoth(testname, callback) {
function testWithDefault (line 46761) | function testWithDefault(testname, callback) {
function createMap (line 46809) | function createMap() {
function generateMatch (line 46851) | function generateMatch(startingPath, matcher, delegate) {
function addRoute (line 46864) | function addRoute(routeArray, path, handler) {
function eachRoute (line 46873) | function eachRoute(baseRoute, matcher, callback, binding) {
function map (line 46889) | function map (callback, addRouteCallback) {
function normalizePath (line 46907) | function normalizePath(path) {
function normalizeSegment (line 46916) | function normalizeSegment(segment) {
function encodePathSegment (line 46932) | function encodePathSegment(str) {
function getParam (line 46939) | function getParam(params, key) {
function parse (line 47007) | function parse(segments, route, names, types, shouldDecodes) {
function isEqualCharSpec (line 47042) | function isEqualCharSpec(spec, char, negate) {
function isMatch (line 47147) | function isMatch(spec, char) {
function sortSolutions (line 47160) | function sortSolutions(states) {
function recognizeChar (line 47190) | function recognizeChar(states, ch) {
function findHandler (line 47206) | function findHandler(state, originalPath, queryParams) {
function decodeQueryParamPart (line 47234) | function decodeQueryParamPart(part) {
function isPromise (line 47487) | function isPromise(obj) {
function merge (line 47491) | function merge(hash, other) {
function F (line 47498) | function F() {}
function extractQueryParams (line 47508) | function extractQueryParams(array) {
function coerceQueryParamsToString (line 47525) | function coerceQueryParamsToString(queryParams) {
function log (line 47539) | function log(router, sequence, msg) {
function bind (line 47550) | function bind(context, fn) {
function isParam (line 47559) | function isParam(object) {
function forEach (line 47564) | function forEach(array, callback) {
function trigger (line 47568) | function trigger(router, handlerInfos, ignoreFailure, args) {
function getChangelist (line 47616) | function getChangelist(oldObject, newObject) {
function promiseLabel (line 47668) | function promiseLabel(label) {
function subclass (line 47672) | function subclass(parentConstructor, proto) {
function resolveHook (line 47681) | function resolveHook(obj, hookName) {
function callHook (line 47688) | function callHook(obj, _hookName, arg1, arg2) {
function applyHook (line 47693) | function applyHook(obj, _hookName, args) {
function TransitionState (line 47708) | function TransitionState() {
function innerShouldContinue (line 47744) | function innerShouldContinue() {
function handleError (line 47754) | function handleError(error) {
function proceed (line 47768) | function proceed(resolvedHandlerInfo) {
function resolveOneHandlerInfo (line 47789) | function resolveOneHandlerInfo() {
function TransitionAbortedError (line 47807) | function TransitionAbortedError(message) {
function Transition (line 47846) | function Transition(router, intent, state, error, previousTransition) {
function catchHandlerForTransition (line 47915) | function catchHandlerForTransition(transition) {
function logAbort (line 48157) | function logAbort(transition) {
function TransitionIntent (line 48162) | function TransitionIntent(props) {
function HandlerInfo (line 48176) | function HandlerInfo(_props) {
function paramsMatch (line 48408) | function paramsMatch(a, b) {
function handlerInfoFactory (line 48527) | function handlerInfoFactory(name, props) {
function UnrecognizedURLError (line 48719) | function UnrecognizedURLError(message) {
function checkHandlerAccessibility (line 48766) | function checkHandlerAccessibility(handler) {
function Router (line 48809) | function Router(_options) {
function getTransitionByIntent (line 48833) | function getTransitionByIntent(intent, isIntermediate) {
function fireQueryParamDidChange (line 49186) | function fireQueryParamDidChange(router, newState, queryParamChangelist) {
function setupContexts (line 49240) | function setupContexts(router, newState, transition) {
function handlerEnteredOrUpdated (line 49285) | function handlerEnteredOrUpdated(currentHandlerInfos, handlerInfo, enter...
function partitionHandlers (line 49361) | function partitionHandlers(oldState, newState) {
function updateURL (line 49403) | function updateURL(transition, state/*, inputUrl*/) {
function finalizeTransition (line 49461) | function finalizeTransition(transition, newState) {
function doTransition (line 49517) | function doTransition(router, args, isIntermediate) {
function handlerInfosEqual (line 49559) | function handlerInfosEqual(handlerInfos, otherHandlerInfos) {
function finalizeQueryParamChange (line 49572) | function finalizeQueryParamChange(router, resolvedHandlers, newQueryPara...
function notifyExistingHandlers (line 49606) | function notifyExistingHandlers(router, newState, newTransition) {
function indexOf (line 49657) | function indexOf(callbacks, callback) {
function callbacksFor (line 49667) | function callbacksFor(object) {
function configure (line 49850) | function configure(name, value) {
function objectOrFunction (line 49866) | function objectOrFunction(x) {
function isFunction (line 49870) | function isFunction(x) {
function isMaybeThenable (line 49874) | function isMaybeThenable(x) {
function F (line 49895) | function F() {}
function scheduleFlush (line 49910) | function scheduleFlush() {
function instrument (line 49929) | function instrument(eventName, promise, child) {
function resolve$1 (line 49978) | function resolve$1(object, label) {
function withOwnPromise (line 49991) | function withOwnPromise() {
function noop (line 49995) | function noop() {}
function getThen (line 50003) | function getThen(promise) {
function tryThen (line 50012) | function tryThen(then, value, fulfillmentHandler, rejectionHandler) {
function handleForeignThenable (line 50020) | function handleForeignThenable(promise, thenable, then) {
function handleOwnThenable (line 50049) | function handleOwnThenable(promise, thenable) {
function handleMaybeThenable (line 50068) | function handleMaybeThenable(promise, maybeThenable, then$$) {
function resolve (line 50085) | function resolve(promise, value) {
function publishRejection (line 50095) | function publishRejection(promise) {
function fulfill (line 50103) | function fulfill(promise, value) {
function reject (line 50120) | function reject(promise, reason) {
function subscribe (line 50129) | function subscribe(parent, child, onFulfillment, onRejection) {
function publish (line 50144) | function publish(promise) {
function ErrorObject (line 50174) | function ErrorObject() {
function tryCatch (line 50180) | function tryCatch(callback, detail) {
function invokeCallback (line 50189) | function invokeCallback(settled, promise, callback, detail) {
function initializePromise (line 50229) | function initializePromise(promise, resolver) {
function then (line 50250) | function then(onFulfillment, onRejection, label) {
function makeSettledResult (line 50282) | function makeSettledResult(state, position, value) {
function Enumerator (line 50296) | function Enumerator(Constructor, input, abortOnReject, label) {
function all (line 50459) | function all(entries, label) {
function race (line 50529) | function race(entries, label) {
function reject$1 (line 50586) | function reject$1(reason, label) {
function needsResolver (line 50597) | function needsResolver() {
function needsNew (line 50601) | function needsNew() {
function Promise (line 50709) | function Promise(resolver, label) {
function Result (line 51028) | function Result() {
function getThen$1 (line 51035) | function getThen$1(obj) {
function tryApply (line 51044) | function tryApply(f, s, a) {
function makeObject (line 51053) | function makeObject(_, argumentNames) {
function arrayResult (line 51070) | function arrayResult(_) {
function wrapThenable (line 51081) | function wrapThenable(then, promise) {
function denodeify (line 51217) | function denodeify(nodeFunc, options) {
function handleValueInput (line 51259) | function handleValueInput(promise, args, nodeFunc, self) {
function handlePromiseInput (line 51267) | function handlePromiseInput(promise, args, nodeFunc, self) {
function needsPromiseInput (line 51277) | function needsPromiseInput(arg) {
function all$1 (line 51299) | function all$1(array, label) {
function AllSettled (line 51303) | function AllSettled(Constructor, entries, label) {
function allSettled (line 51366) | function allSettled(entries, label) {
function race$1 (line 51380) | function race$1(array, label) {
function PromiseHash (line 51384) | function PromiseHash(Constructor, object, label) {
function hash (line 51515) | function hash(object, label) {
function HashSettled (line 51519) | function HashSettled(Constructor, object, label) {
function hashSettled (line 51632) | function hashSettled(object, label) {
function rethrow (line 51676) | function rethrow(reason) {
function defer (line 51716) | function defer(label) {
function map (line 51805) | function map(promises, mapFn, label) {
function resolve$2 (line 51834) | function resolve$2(value, label) {
function reject$2 (line 51849) | function reject$2(reason, label) {
function resolveAll (line 51939) | function resolveAll(promises, label) {
function resolveSingle (line 51943) | function resolveSingle(promise, label) {
function filter (line 51949) | function filter(promises, filterFn, label) {
function asap (line 51983) | function asap(callback, arg) {
function useNextTick (line 52004) | function useNextTick() {
function useVertxTimer (line 52018) | function useVertxTimer() {
function useMutationObserver (line 52027) | function useMutationObserver() {
function useMessageChannel (line 52039) | function useMessageChannel() {
function useSetTimeout (line 52047) | function useSetTimeout() {
function flush (line 52055) | function flush() {
function attemptVertex (line 52069) | function attemptVertex() {
function on (line 52118) | function on() {
function off (line 52122) | function off() {
FILE: test/bench/fixtures/jquery.js
function DOMEval (line 76) | function DOMEval( code, doc ) {
function isArrayLike (line 522) | function isArrayLike( obj ) {
function Sizzle (line 754) | function Sizzle( selector, context, results, seed ) {
function createCache (line 893) | function createCache() {
function markFunction (line 911) | function markFunction( fn ) {
function assert (line 920) | function assert( fn ) {
function addHandle (line 942) | function addHandle( attrs, handler ) {
function siblingCheck (line 957) | function siblingCheck( a, b ) {
function createInputPseudo (line 983) | function createInputPseudo( type ) {
function createButtonPseudo (line 994) | function createButtonPseudo( type ) {
function createDisabledPseudo (line 1005) | function createDisabledPseudo( disabled ) {
function createPositionalPseudo (line 1061) | function createPositionalPseudo( fn ) {
function testContext (line 1084) | function testContext( context ) {
function setFilters (line 2166) | function setFilters() {}
function toSelector (line 2237) | function toSelector( tokens ) {
function addCombinator (line 2247) | function addCombinator( matcher, combinator, base ) {
function elementMatcher (line 2311) | function elementMatcher( matchers ) {
function multipleContexts (line 2325) | function multipleContexts( selector, contexts, results ) {
function condense (line 2334) | function condense( unmatched, map, filter, context, xml ) {
function setMatcher (line 2355) | function setMatcher( preFilter, selector, matcher, postFilter, postFinde...
function matcherFromTokens (line 2448) | function matcherFromTokens( tokens ) {
function matcherFromGroupMatchers (line 2506) | function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
function nodeName (line 2842) | function nodeName( elem, name ) {
function winnow (line 2854) | function winnow( elements, qualifier, not ) {
function sibling (line 3157) | function sibling( cur, dir ) {
function createOptions (line 3244) | function createOptions( options ) {
function Identity (line 3469) | function Identity( v ) {
function Thrower (line 3472) | function Thrower( ex ) {
function adoptValue (line 3476) | function adoptValue( value, resolve, reject, noValue ) {
function resolve (line 3569) | function resolve( depth, deferred, handler, special ) {
function completed (line 3927) | function completed() {
function Data (line 4029) | function Data() {
function getData (line 4198) | function getData( data ) {
function dataAttr (line 4223) | function dataAttr( elem, key, data ) {
function adjustCSS (line 4536) | function adjustCSS( elem, prop, valueParts, tween ) {
function getDefaultDisplay (line 4601) | function getDefaultDisplay( elem ) {
function showHide (line 4624) | function showHide( elements, show ) {
function getAll (line 4725) | function getAll( context, tag ) {
function setGlobalEval (line 4750) | function setGlobalEval( elems, refElements ) {
function buildFragment (line 4766) | function buildFragment( elems, context, scripts, selection, ignored ) {
function returnTrue (line 4889) | function returnTrue() {
function returnFalse (line 4893) | function returnFalse() {
function safeActiveElement (line 4899) | function safeActiveElement() {
function on (line 4905) | function on( elem, types, selector, data, fn, one ) {
function manipulationTarget (line 5634) | function manipulationTarget( elem, content ) {
function disableScript (line 5645) | function disableScript( elem ) {
function restoreScript (line 5649) | function restoreScript( elem ) {
function cloneCopyEvent (line 5661) | function cloneCopyEvent( src, dest ) {
function fixInput (line 5696) | function fixInput( src, dest ) {
function domManip (line 5709) | function domManip( collection, args, callback, ignored ) {
function remove (line 5799) | function remove( elem, selector, keepData ) {
function computeStyleTests (line 6092) | function computeStyleTests() {
function curCSS (line 6166) | function curCSS( elem, name, computed ) {
function addGetHookIf (line 6219) | function addGetHookIf( conditionFn, hookFn ) {
function vendorPropName (line 6256) | function vendorPropName( name ) {
function finalPropName (line 6277) | function finalPropName( name ) {
function setPositiveNumber (line 6285) | function setPositiveNumber( elem, value, subtract ) {
function augmentWidthOrHeight (line 6297) | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
function getWidthOrHeight (line 6343) | function getWidthOrHeight( elem, name, extra ) {
function Tween (line 6652) | function Tween( elem, options, prop, end, easing ) {
function schedule (line 6775) | function schedule() {
function createFxNow (line 6788) | function createFxNow() {
function genFx (line 6796) | function genFx( type, includeWidth ) {
function createTween (line 6816) | function createTween( value, prop, animation ) {
function defaultPrefilter (line 6830) | function defaultPrefilter( elem, props, opts ) {
function propFilter (line 7001) | function propFilter( props, specialEasing ) {
function Animation (line 7038) | function Animation( elem, properties, options ) {
function stripAndCollapse (line 7753) | function stripAndCollapse( value ) {
function getClass (line 7759) | function getClass( elem ) {
function buildParams (line 8383) | function buildParams( prefix, obj, traditional, add ) {
function addToPrefiltersOrTransports (line 8533) | function addToPrefiltersOrTransports( structure ) {
function inspectPrefiltersOrTransports (line 8567) | function inspectPrefiltersOrTransports( structure, options, originalOpti...
function ajaxExtend (line 8596) | function ajaxExtend( target, src ) {
function ajaxHandleResponses (line 8616) | function ajaxHandleResponses( s, jqXHR, responses ) {
function ajaxConvert (line 8674) | function ajaxConvert( s, response, jqXHR, isSuccess ) {
function done (line 9187) | function done( status, nativeStatusText, responses, headers ) {
FILE: test/bench/fixtures/react-dom.js
function s (line 32) | function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&re...
function isPresto (line 173) | function isPresto() {
function isKeypressCommand (line 221) | function isKeypressCommand(nativeEvent) {
function getCompositionEventType (line 233) | function getCompositionEventType(topLevelType) {
function isFallbackCompositionStart (line 252) | function isFallbackCompositionStart(topLevelType, nativeEvent) {
function isFallbackCompositionEnd (line 263) | function isFallbackCompositionEnd(topLevelType, nativeEvent) {
function getDataFromCustomEvent (line 291) | function getDataFromCustomEvent(nativeEvent) {
function extractCompositionEvent (line 305) | function extractCompositionEvent(topLevelType, targetInst, nativeEvent, ...
function getNativeBeforeInputChars (line 357) | function getNativeBeforeInputChars(topLevelType, nativeEvent) {
function getFallbackBeforeInputChars (line 411) | function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
function extractBeforeInputEvent (line 465) | function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, ...
function prefixKey (line 577) | function prefixKey(prefix, key) {
function _classCallCheck (line 888) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function CallbackQueue (line 907) | function CallbackQueue(arg) {
function shouldUseChangeEvent (line 1036) | function shouldUseChangeEvent(elem) {
function manualDispatchChangeEvent (line 1047) | function manualDispatchChangeEvent(nativeEvent) {
function runEventInBatch (line 1065) | function runEventInBatch(event) {
function startWatchingForChangeEventIE8 (line 1070) | function startWatchingForChangeEventIE8(target, targetInst) {
function stopWatchingForChangeEventIE8 (line 1076) | function stopWatchingForChangeEventIE8() {
function getTargetInstForChangeEvent (line 1085) | function getTargetInstForChangeEvent(topLevelType, targetInst) {
function handleEventsForChangeEventIE8 (line 1090) | function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
function startWatchingForValueChange (line 1133) | function startWatchingForValueChange(target, targetInst) {
function stopWatchingForValueChange (line 1153) | function stopWatchingForValueChange() {
function handlePropertyChange (line 1177) | function handlePropertyChange(nativeEvent) {
function getTargetInstForInputEvent (line 1193) | function getTargetInstForInputEvent(topLevelType, targetInst) {
function handleEventsForInputEventIE (line 1201) | function handleEventsForInputEventIE(topLevelType, target, targetInst) {
function getTargetInstForInputEventIE (line 1224) | function getTargetInstForInputEventIE(topLevelType, targetInst) {
function shouldUseClickEvent (line 1246) | function shouldUseClickEvent(elem) {
function getTargetInstForClickEvent (line 1253) | function getTargetInstForClickEvent(topLevelType, targetInst) {
function handleControlledInputBlur (line 1259) | function handleControlledInputBlur(inst, node) {
function getNodeAfter (line 1359) | function getNodeAfter(parentNode, node) {
function insertLazyTreeChildAt (line 1383) | function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
function moveChild (line 1387) | function moveChild(parentNode, childNode, referenceNode) {
function removeChild (line 1395) | function removeChild(parentNode, childNode) {
function moveDelimitedText (line 1405) | function moveDelimitedText(parentNode, openingComment, closingComment, r...
function removeDelimitedText (line 1417) | function removeDelimitedText(parentNode, startNode, closingComment) {
function replaceDelimitedText (line 1429) | function replaceDelimitedText(openingComment, closingComment, stringText) {
function insertTreeChildren (line 1597) | function insertTreeChildren(tree) {
function replaceChildWithTree (line 1630) | function replaceChildWithTree(oldNode, newTree) {
function queueChild (line 1635) | function queueChild(parentTree, childTree) {
function queueHTML (line 1643) | function queueHTML(tree, html) {
function queueText (line 1651) | function queueText(tree, text) {
function toString (line 1659) | function toString() {
function DOMLazyTree (line 1663) | function DOMLazyTree(node) {
function checkMask (line 1717) | function checkMask(value, bitmask) {
function isAttributeNameSafe (line 1934) | function isAttributeNameSafe(attributeName) {
function shouldIgnoreValue (line 1950) | function shouldIgnoreValue(propertyInfo, value) {
function isInteractive (line 2476) | function isInteractive(tag) {
function shouldPreventMouseEvent (line 2480) | function shouldPreventMouseEvent(name, type, props) {
function recomputePluginOrdering (line 2724) | function recomputePluginOrdering() {
function publishEventForPlugin (line 2753) | function publishEventForPlugin(dispatchConfig, pluginModule, eventName) {
function publishRegistrationName (line 2781) | function publishRegistrationName(registrationName, pluginModule, eventNa...
function isEndish (line 2991) | function isEndish(topLevelType) {
function isMoveish (line 2995) | function isMoveish(topLevelType) {
function isStartish (line 2998) | function isStartish(topLevelType) {
function executeDispatch (line 3025) | function executeDispatch(event, simulated, listener, inst) {
function executeDispatchesInOrder (line 3039) | function executeDispatchesInOrder(event, simulated) {
function executeDispatchesInOrderStopAtTrueImpl (line 3067) | function executeDispatchesInOrderStopAtTrueImpl(event) {
function executeDispatchesInOrderStopAtTrue (line 3094) | function executeDispatchesInOrderStopAtTrue(event) {
function executeDirectDispatch (line 3110) | function executeDirectDispatch(event) {
function hasDispatches (line 3129) | function hasDispatches(event) {
function listenerAtPhase (line 3198) | function listenerAtPhase(inst, event, propagationPhase) {
function accumulateDirectionalDispatches (line 3209) | function accumulateDirectionalDispatches(inst, phase, event) {
function accumulateTwoPhaseDispatchesSingle (line 3227) | function accumulateTwoPhaseDispatchesSingle(event) {
function accumulateTwoPhaseDispatchesSingleSkipTarget (line 3236) | function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
function accumulateDispatches (line 3249) | function accumulateDispatches(inst, ignoredDirection, event) {
function accumulateDirectDispatchesSingle (line 3265) | function accumulateDirectDispatchesSingle(event) {
function accumulateTwoPhaseDispatches (line 3271) | function accumulateTwoPhaseDispatches(events) {
function accumulateTwoPhaseDispatchesSkipTarget (line 3275) | function accumulateTwoPhaseDispatchesSkipTarget(events) {
function accumulateEnterLeaveDispatches (line 3279) | function accumulateEnterLeaveDispatches(leave, enter, from, to) {
function accumulateDirectDispatches (line 3283) | function accumulateDirectDispatches(events) {
function FallbackCompositionState (line 3336) | function FallbackCompositionState(root) {
function escape (line 3658) | function escape(key) {
function unescape (line 3677) | function unescape(key) {
function _assertSingleLink (line 3730) | function _assertSingleLink(inputProps) {
function _assertValueLink (line 3733) | function _assertValueLink(inputProps) {
function _assertCheckedLink (line 3738) | function _assertCheckedLink(inputProps) {
function getDeclarationErrorAddendum (line 3760) | function getDeclarationErrorAddendum(owner) {
function getListeningForDocument (line 4103) | function getListeningForDocument(mountAt) {
function instantiateChild (line 4307) | function instantiateChild(childInstances, child, name, selfDebugID) {
function StatelessComponent (line 4547) | function StatelessComponent(Component) {}
function warnIfInvalidElement (line 4555) | function warnIfInvalidElement(Component, element) {
function shouldConstruct (line 4562) | function shouldConstruct(Component) {
function isPureComponent (line 4566) | function isPureComponent(Component) {
function measureLifeCyclePerf (line 4571) | function measureLifeCyclePerf(fn, debugID, timerType) {
function getDeclarationErrorAddendum (line 5584) | function getDeclarationErrorAddendum(internalInstance) {
function friendlyStringify (line 5597) | function friendlyStringify(obj) {
function checkAndWarnForMutatedStyle (line 5623) | function checkAndWarnForMutatedStyle(style1, style2, component) {
function assertValidProps (line 5653) | function assertValidProps(component, props) {
function enqueuePutListener (line 5673) | function enqueuePutListener(inst, registrationName, listener, transactio...
function putListener (line 5693) | function putListener() {
function inputPostMount (line 5698) | function inputPostMount() {
function textareaPostMount (line 5703) | function textareaPostMount() {
function optionPostMount (line 5708) | function optionPostMount() {
function trapBubbledEventsLocal (line 5770) | function trapBubbledEventsLocal() {
function postUpdateSelectWrapper (line 5811) | function postUpdateSelectWrapper() {
function validateDangerousTag (line 5857) | function validateDangerousTag(tag) {
function isCustomComponent (line 5864) | function isCustomComponent(tagName, props) {
function ReactDOMComponent (line 5884) | function ReactDOMComponent(element) {
function shouldPrecacheNode (line 6566) | function shouldPrecacheNode(node, nodeID) {
function getRenderedHostOrTextFromComponent (line 6577) | function getRenderedHostOrTextFromComponent(component) {
function precacheNode (line 6589) | function precacheNode(inst, node) {
function uncacheNode (line 6595) | function uncacheNode(inst) {
function precacheChildNodes (line 6617) | function precacheChildNodes(inst, node) {
function getClosestInstanceFromNode (line 6650) | function getClosestInstanceFromNode(node) {
function getInstanceFromNode (line 6684) | function getInstanceFromNode(node) {
function getNodeFromInstance (line 6697) | function getNodeFromInstance(inst) {
function ReactDOMContainerInfo (line 6750) | function ReactDOMContainerInfo(topLevelWrapper, node) {
function forceUpdateIfMounted (line 6910) | function forceUpdateIfMounted() {
function isControlled (line 6917) | function isControlled(props) {
function _handleChange (line 7115) | function _handleChange(event) {
function validateProperty (line 7185) | function validateProperty(tagName, name, debugID) {
function warnInvalidARIAProps (line 7211) | function warnInvalidARIAProps(debugID, element) {
function handleElement (line 7232) | function handleElement(debugID, element) {
function handleElement (line 7276) | function handleElement(debugID, element) {
function flattenChildren (line 7322) | function flattenChildren(children) {
function updateOptionsIfPendingUpdateAndMounted (line 7447) | function updateOptionsIfPendingUpdateAndMounted() {
function getDeclarationErrorAddendum (line 7460) | function getDeclarationErrorAddendum(owner) {
function checkSelectPropTypes (line 7476) | function checkSelectPropTypes(inst, props) {
function updateOptions (line 7505) | function updateOptions(inst, multiple, propValue) {
function _handleChange (line 7611) | function _handleChange(event) {
function isCollapsed (line 7646) | function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
function getIEOffsets (line 7664) | function getIEOffsets(node) {
function getModernOffsets (line 7687) | function getModernOffsets(node) {
function setIEOffsets (line 7749) | function setIEOffsets(node, offsets) {
function setModernOffsets (line 7783) | function setModernOffsets(node, offsets) {
function forceUpdateIfMounted (line 8025) | function forceUpdateIfMounted() {
function _handleChange (line 8151) | function _handleChange(event) {
function getLowestCommonAncestor (line 8180) | function getLowestCommonAncestor(instA, instB) {
function isAncestor (line 8220) | function isAncestor(instA, instB) {
function getParentInstance (line 8236) | function getParentInstance(inst) {
function traverseTwoPhase (line 8245) | function traverseTwoPhase(inst, fn, arg) {
function traverseEnterLeave (line 8267) | function traverseEnterLeave(from, to, fn, argFrom, argTo) {
function handleElement (line 8421) | function handleElement(debugID, element) {
function callHook (line 8466) | function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
function emitEvent (line 8475) | function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
function clearHistory (line 8498) | function clearHistory() {
function getTreeSnapshot (line 8503) | function getTreeSnapshot(registeredIDs) {
function resetMeasurements (line 8520) | function resetMeasurements() {
function checkDebugID (line 8547) | function checkDebugID(debugID) {
function beginLifeCycleTimer (line 8558) | function beginLifeCycleTimer(debugID, timerType) {
function endLifeCycleTimer (line 8572) | function endLifeCycleTimer(debugID, timerType) {
function pauseCurrentLifeCycleTimer (line 8593) | function pauseCurrentLifeCycleTimer() {
function resumeCurrentLifeCycleTimer (line 8607) | function resumeCurrentLifeCycleTimer() {
function shouldMark (line 8624) | function shouldMark(debugID) {
function markBegin (line 8639) | function markBegin(debugID, markType) {
function markEnd (line 8649) | function markEnd(debugID, markType) {
function ReactDefaultBatchingStrategyTransaction (line 8834) | function ReactDefaultBatchingStrategyTransaction() {
function inject (line 8903) | function inject() {
function invokeGuardedCallback (line 9028) | function invokeGuardedCallback(name, func, a) {
function runEventQueueInBatch (line 9095) | function runEventQueueInBatch(events) {
function findParent (line 9142) | function findParent(inst) {
function TopLevelCallbackBookKeeping (line 9155) | function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
function handleTopLevelImpl (line 9169) | function handleTopLevelImpl(bookKeeping) {
function scrollValueMonitor (line 9189) | function scrollValueMonitor(cb) {
function createInternalComponent (line 9329) | function createInternalComponent(element) {
function createInstanceForText (line 9338) | function createInstanceForText(text) {
function isTextComponent (line 9346) | function isTextComponent(component) {
function isInDocument (line 9445) | function isInDocument(node) {
function firstDifferenceIndex (line 9762) | function firstDifferenceIndex(string1, string2) {
function getReactRootElementInContainer (line 9777) | function getReactRootElementInContainer(container) {
function internalGetID (line 9789) | function internalGetID(node) {
function mountComponentIntoNode (line 9804) | function mountComponentIntoNode(wrapperInstance, container, transaction,...
function batchedMountComponentIntoNode (line 9831) | function batchedMountComponentIntoNode(componentInstance, container, sho...
function unmountComponentFromNode (line 9848) | function unmountComponentFromNode(instance, container, safely) {
function hasNonRootReactChild (line 9877) | function hasNonRootReactChild(container) {
function nodeIsRenderedByOtherInstance (line 9893) | function nodeIsRenderedByOtherInstance(container) {
function isValidContainer (line 9905) | function isValidContainer(node) {
function isReactNode (line 9916) | function isReactNode(node) {
function getHostRootInstanceInContainer (line 9920) | function getHostRootInstanceInContainer(container) {
function getTopLevelWrapperInContainer (line 9926) | function getTopLevelWrapperInContainer(container) {
function makeInsertMarkup (line 10281) | function makeInsertMarkup(markup, afterNode, toIndex) {
function makeMove (line 10300) | function makeMove(child, afterNode, toIndex) {
function makeRemove (line 10318) | function makeRemove(child, node) {
function makeSetMarkup (line 10336) | function makeSetMarkup(markup) {
function makeTextContent (line 10354) | function makeTextContent(textContent) {
function enqueue (line 10370) | function enqueue(queue, update) {
function processQueue (line 10383) | function processQueue(inst, updateQueue) {
function isValidOwner (line 10760) | function isValidOwner(object) {
function roundFloat (line 10853) | function roundFloat(val) {
function consoleTable (line 10862) | function consoleTable(table) {
function warnInProduction (line 10866) | function warnInProduction() {
function getLastMeasurements (line 10876) | function getLastMeasurements() {
function getExclusive (line 10885) | function getExclusive() {
function getInclusive (line 10947) | function getInclusive() {
function getWasted (line 11032) | function getWasted() {
function getOperations (line 11142) | function getOperations() {
function printExclusive (line 11179) | function printExclusive(flushHistory) {
function printInclusive (line 11206) | function printInclusive(flushHistory) {
function printWasted (line 11229) | function printWasted(flushHistory) {
function printOperations (line 11252) | function printOperations(flushHistory) {
function printDOM (line 11273) | function printDOM(measurements) {
function getMeasurementsSummaryMap (line 11280) | function getMeasurementsSummaryMap(measurements) {
function start (line 11286) | function start() {
function stop (line 11295) | function stop() {
function isRunning (line 11304) | function isRunning() {
function ReactReconcileTransaction (line 11486) | function ReactReconcileTransaction(useCreateElement) {
function attachRefs (line 11574) | function attachRefs() {
function attachRef (line 11738) | function attachRef(ref, component, owner) {
function detachRef (line 11747) | function detachRef(ref, component, owner) {
function ReactServerRenderingTransaction (line 11851) | function ReactServerRenderingTransaction(renderToStaticMarkup) {
function _classCallCheck (line 11913) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function warnNoop (line 11919) | function warnNoop(publicInstance, callerName) {
function ReactServerUpdateQueue (line 11935) | function ReactServerUpdateQueue(transaction) {
function _classCallCheck (line 12054) | function _classCallCheck(instance, Constructor) { if (!(instance instanc...
function injectDefaults (line 12067) | function injectDefaults() {
function NoopInternalComponent (line 12073) | function NoopInternalComponent(element) {
function _batchedRender (line 12121) | function _batchedRender(renderer, element, context) {
function ReactShallowRenderer (line 12128) | function ReactShallowRenderer() {
function Event (line 12224) | function Event(suffix) {}
function createRendererWithWarning (line 12230) | function createRendererWithWarning() {
function findAllInRenderedTreeInternal (line 12241) | function findAllInRenderedTreeInternal(inst, test) {
function makeSimulator (line 12507) | function makeSimulator(eventType) {
function buildSimulators (line 12544) | function buildSimulators() {
function makeNativeSimulator (line 12587) | function makeNativeSimulator(eventType) {
function enqueueUpdate (line 12634) | function enqueueUpdate(internalInstance) {
function formatUnexpectedArgument (line 12638) | function formatUnexpectedArgument(arg) {
function getInternalInstanceReadyForUpdate (line 12651) | function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
function ensureInjected (line 12878) | function ensureInjected() {
function ReactUpdatesFlushTransaction (line 12912) | function ReactUpdatesFlushTransaction() {
function batchedUpdates (line 12942) | function batchedUpdates(callback, a, b, c, d, e) {
function mountOrderComparator (line 12954) | function mountOrderComparator(c1, c2) {
function runBatchedUpdates (line 12958) | function runBatchedUpdates(transaction) {
function enqueueUpdate (line 13037) | function enqueueUpdate(component) {
function asap (line 13061) | function asap(callback, context) {
function getSelection (line 13467) | function getSelection(node) {
function constructSelectEvent (line 13498) | function constructSelectEvent(nativeEvent, nativeEventTarget) {
function getDictionaryKey (line 13678) | function getDictionaryKey(inst) {
function isInteractive (line 13684) | function isInteractive(tag) {
function SyntheticAnimationEvent (line 13865) | function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeE...
function SyntheticClipboardEvent (line 13903) | function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeE...
function SyntheticCompositionEvent (line 13939) | function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativ...
function SyntheticDragEvent (line 13975) | function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent,...
function SyntheticEvent (line 14044) | function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeE...
function getPooledWarningPropertyDefinition (line 14224) | function getPooledWarningPropertyDefinition(propName, getVal) {
function SyntheticFocusEvent (line 14279) | function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent...
function SyntheticInputEvent (line 14316) | function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent...
function SyntheticKeyboardEvent (line 14400) | function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEv...
function SyntheticMouseEvent (line 14472) | function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent...
function SyntheticTouchEvent (line 14517) | function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent...
function SyntheticTransitionEvent (line 14556) | function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, native...
function SyntheticUIEvent (line 14615) | function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, n...
function SyntheticWheelEvent (line 14669) | function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent...
function accumulateInto (line 14959) | function accumulateInto(current, next) {
function adler32 (line 15007) | function adler32(data) {
function checkReactTypeSpec (line 15077) | function checkReactTypeSpec(typeSpecs, values, location, componentName, ...
function dangerousStyleValue (line 15180) | function dangerousStyleValue(name, value, component) {
function escapeHtml (line 15284) | function escapeHtml(string) {
function escapeTextContentForBrowser (line 15342) | function escapeTextContentForBrowser(text) {
function findDOMNode (line 15384) | function findDOMNode(componentOrElement) {
function flattenSingleChildIntoContext (line 15449) | function flattenSingleChildIntoContext(traverseContext, child, name, sel...
function flattenChildren (line 15473) | function flattenChildren(children, selfDebugID) {
function forEachAccumulated (line 15513) | function forEachAccumulated(arr, cb, scope) {
function getEventCharCode (line 15546) | function getEventCharCode(nativeEvent) {
function getEventKey (line 15644) | function getEventKey(nativeEvent) {
function modifierStateGetter (line 15702) | function modifierStateGetter(keyArg) {
function getEventModifierState (line 15712) | function getEventModifierState(nativeEvent) {
function getEventTarget (line 15738) | function getEventTarget(nativeEvent) {
function getHostComponentFromComposite (line 15767) | function getHostComponentFromComposite(inst) {
function getIteratorFn (line 15815) | function getIteratorFn(maybeIterable) {
function getLeafNode (line 15843) | function getLeafNode(node) {
function getSiblingNode (line 15857) | function getSiblingNode(node) {
function getNodeForCharacterOffset (line 15873) | function getNodeForCharacterOffset(root, offset) {
function getTextContentAccessor (line 15920) | function getTextContentAccessor() {
function makePrefixMap (line 15952) | function makePrefixMap(styleProp, eventName) {
function getVendorPrefixedEventName (line 16012) | function getVendorPrefixedEventName(eventName) {
function getDeclarationErrorAddendum (line 16060) | function getDeclarationErrorAddendum(owner) {
function isInternalComponentType (line 16077) | function isInternalComponentType(type) {
function instantiateReactComponent (line 16089) | function instantiateReactComponent(node, shouldHaveDebugID) {
function isEventSupported (line 16197) | function isEventSupported(eventNameSuffix, capture) {
function isTextInputElement (line 16256) | function isTextInputElement(elem) {
function quoteAttributeValueForBrowser (line 16292) | function quoteAttributeValueForBrowser(value) {
function reactProdInvariant (line 16317) | function reactProdInvariant(code) {
function shouldUpdateReactComponent (line 16527) | function shouldUpdateReactComponent(prevElement, nextElement) {
function getComponentKey (line 16590) | function getComponentKey(component, index) {
function traverseAllChildrenImpl (line 16609) | function traverseAllChildrenImpl(children, nameSoFar, callback, traverse...
function traverseAllChildren (line 16711) | function traverseAllChildren(children, callback, traverseContext) {
function camelize (line 17312) | function camelize(string) {
function camelizeStyleName (line 17354) | function camelizeStyleName(string) {
function containsNode (line 17380) | function containsNode(outerNode, innerNode) {
function toArray (line 17424) | function toArray(obj) {
function hasArrayNature (line 17472) | function hasArrayNature(obj) {
function createArrayFromMixed (line 17515) | function createArrayFromMixed(obj) {
function getNodeName (line 17564) | function getNodeName(markup) {
function createNodesFromMarkup (line 17579) | function createNodesFromMarkup(markup, handleScript) {
function makeEmptyFunction (line 17624) | function makeEmptyFunction(arg) {
function focusNode (line 17686) | function focusNode(node) {
function getActiveElement (line 17722) | function getActiveElement(doc) /*?DOMElement*/{
function getMarkupWrap (line 17813) | function getMarkupWrap(nodeName) {
function getUnboundedScrollPosition (line 17855) | function getUnboundedScrollPosition(scrollable) {
function hyphenate (line 17897) | function hyphenate(string) {
function hyphenateStyleName (line 17936) | function hyphenateStyleName(string) {
function invariant (line 17975) | function invariant(condition, format, a, b, c, d, e, f) {
function isNode (line 18015) | function isNode(object) {
function isTextNode (line 18042) | function isTextNode(object) {
function memoizeStringOnly (line 18066) | function memoizeStringOnly(callback) {
function is (line 18157) | function is(x, y) {
function shallowEqual (line 18175) | function shallowEqual(objA, objB) {
function toObject (line 18282) | function toObject(val) {
function shouldUseNative (line 18290) | function shouldUseNative() {
function checkPropTypes (line 18391) | function checkPropTypes(typeSpecs, values, location, componentName, getS...
function getIteratorFn (line 18485) | function getIteratorFn(maybeIterable) {
function is (line 18568) | function is(x, y) {
function PropTypeError (line 18588) | function PropTypeError(message) {
function createChainableTypeChecker (line 18595) | function createChainableTypeChecker(validate) {
function createPrimitiveTypeChecker (line 18649) | function createPrimitiveTypeChecker(expectedType) {
function createAnyTypeChecker (line 18666) | function createAnyTypeChecker() {
function createArrayOfTypeChecker (line 18670) | function createArrayOfTypeChecker(typeChecker) {
function createElementTypeChecker (line 18691) | function createElementTypeChecker() {
function createInstanceTypeChecker (line 18703) | function createInstanceTypeChecker(expectedClass) {
function createEnumTypeChecker (line 18715) | function createEnumTypeChecker(expectedValues) {
function createObjectOfTypeChecker (line 18735) | function createObjectOfTypeChecker(typeChecker) {
function createUnionTypeChecker (line 18758) | function createUnionTypeChecker(arrayOfTypeCheckers) {
function createNodeChecker (line 18777) | function createNodeChecker() {
function createShapeTypeChecker (line 18787) | function createShapeTypeChecker(shapeTypes) {
function isNode (line 18809) | function isNode(propValue) {
function isSymbol (line 18856) | function isSymbol(propType, propValue) {
function getPropType (line 18876) | function getPropType(propValue) {
function getPreciseType (line 18895) | function getPreciseType(propValue) {
function getClassName (line 18908) | function getClassName(propValue) {
FILE: test/bench/fixtures/react.js
function s (line 4) | function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&re...
function escape (line 25) | function escape(key) {
function unescape (line 44) | function unescape(key) {
function escapeUserProvidedKey (line 302) | function escapeUserProvidedKey(text) {
function ForEachBookKeeping (line 314) | function ForEachBookKeeping(forEachFunction, forEachContext) {
function forEachSingleChild (line 326) | function forEachSingleChild(bookKeeping, child, name) {
function forEachChildren (line 345) | function forEachChildren(children, forEachFunc, forEachContext) {
function MapBookKeeping (line 363) | function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
function mapSingleChildIntoContext (line 379) | function mapSingleChildIntoContext(bookKeeping, child, childKey) {
function mapIntoWithKeyPrefixInternal (line 400) | function mapIntoWithKeyPrefixInternal(children, array, prefix, func, con...
function mapChildren (line 423) | function mapChildren(children, func, context) {
function forEachSingleChildDummy (line 432) | function forEachSingleChildDummy(traverseContext, child, name) {
function countChildren (line 445) | function countChildren(children, context) {
function toArray (line 455) | function toArray(children) {
function identity (line 499) | function identity(fn) {
function validateTypeDef (line 808) | function validateTypeDef(Constructor, typeDef, location) {
function validateMethodOverride (line 818) | function validateMethodOverride(isAlreadyDefined, name) {
function mixSpecIntoComponent (line 836) | function mixSpecIntoComponent(Constructor, spec) {
function mixStaticSpecIntoComponent (line 918) | function mixStaticSpecIntoComponent(Constructor, statics) {
function mergeIntoWithNoDuplicateKeys (line 944) | function mergeIntoWithNoDuplicateKeys(one, two) {
function createMergedResultFunction (line 964) | function createMergedResultFunction(one, two) {
function createChainedFunction (line 988) | function createChainedFunction(one, two) {
function bindAutoBindMethod (line 1002) | function bindAutoBindMethod(component, method) {
function bindAutoBindMethods (line 1039) | function bindAutoBindMethods(component) {
function ReactComponent (line 1218) | function ReactComponent(props, context, updater) {
function isNative (line 1332) | function isNative(fn) {
function purgeDeep (line 1441) | function purgeDeep(id) {
function describeComponentFrame (line 1451) | function describeComponentFrame(name, source, ownerName) {
function getDisplayName (line 1455) | function getDisplayName(element) {
function describeID (line 1467) | function describeID(id) {
function hasValidRef (line 1878) | function hasValidRef(config) {
function hasValidKey (line 1890) | function hasValidKey(config) {
function defineKeyPropWarningGetter (line 1902) | function defineKeyPropWarningGetter(props, displayName) {
function defineRefPropWarningGetter (line 1916) | function defineRefPropWarningGetter(props, displayName) {
function getDeclarationErrorAddendum (line 2237) | function getDeclarationErrorAddendum() {
function getSourceInfoErrorAddendum (line 2247) | function getSourceInfoErrorAddendum(elementProps) {
function getCurrentComponentErrorInfo (line 2264) | function getCurrentComponentErrorInfo(parentType) {
function validateExplicitKey (line 2287) | function validateExplicitKey(element, parentType) {
function validateChildKeys (line 2322) | function validateChildKeys(node, parentType) {
function validatePropTypes (line 2361) | function validatePropTypes(element) {
function warnNoop (line 2475) | function warnNoop(publicInstance, callerName) {
function ReactPureComponent (line 2640) | function ReactPureComponent(props, context, updater) {
function ComponentDummy (line 2650) | function ComponentDummy() {}
function checkReactTypeSpec (line 2779) | function checkReactTypeSpec(typeSpecs, values, location, componentName, ...
function getIteratorFn (line 2854) | function getIteratorFn(maybeIterable) {
function getNextDebugID (line 2878) | function getNextDebugID() {
function onlyChild (line 2915) | function onlyChild(children) {
function reactProdInvariant (line 2941) | function reactProdInvariant(code) {
function getComponentKey (line 3006) | function getComponentKey(component, index) {
function traverseAllChildrenImpl (line 3025) | function traverseAllChildrenImpl(children, nameSoFar, callback, traverse...
function traverseAllChildren (line 3127) | function traverseAllChildren(children, callback, traverseContext) {
function makeEmptyFunction (line 3150) | function makeEmptyFunction(arg) {
function invariant (line 3229) | function invariant(condition, format, a, b, c, d, e, f) {
function toObject (line 3331) | function toObject(val) {
function shouldUseNative (line 3339) | function shouldUseNative() {
function checkPropTypes (line 3440) | function checkPropTypes(typeSpecs, values, location, componentName, getS...
function getIteratorFn (line 3534) | function getIteratorFn(maybeIterable) {
function is (line 3617) | function is(x, y) {
function PropTypeError (line 3637) | function PropTypeError(message) {
function createChainableTypeChecker (line 3644) | function createChainableTypeChecker(validate) {
function createPrimitiveTypeChecker (line 3698) | function createPrimitiveTypeChecker(expectedType) {
function createAnyTypeChecker (line 3715) | function createAnyTypeChecker() {
function createArrayOfTypeChecker (line 3719) | function createArrayOfTypeChecker(typeChecker) {
function createElementTypeChecker (line 3740) | function createElementTypeChecker() {
function createInstanceTypeChecker (line 3752) | function createInstanceTypeChecker(expectedClass) {
function createEnumTypeChecker (line 3764) | function createEnumTypeChecker(expectedValues) {
function createObjectOfTypeChecker (line 3784) | function createObjectOfTypeChecker(typeChecker) {
function createUnionTypeChecker (line 3807) | function createUnionTypeChecker(arrayOfTypeCheckers) {
function createNodeChecker (line 3826) | function createNodeChecker() {
function createShapeTypeChecker (line 3836) | function createShapeTypeChecker(shapeTypes) {
function isNode (line 3858) | function isNode(propValue) {
function isSymbol (line 3905) | function isSymbol(propType, propValue) {
function getPropType (line 3925) | function getPropType(propValue) {
function getPreciseType (line 3944) | function getPreciseType(propValue) {
function getClassName (line 3957) | function getClassName(propValue) {
FILE: test/bench/worker.js
function getCell (line 14) | function getCell(bench) {
function reportCell (line 48) | function reportCell(bench, type, text) {
FILE: test/driver.js
function ppJSON (line 64) | function ppJSON(v) { return v instanceof RegExp ? v.toString() : (typeof...
function addPath (line 65) | function addPath(str, pt) {
FILE: test/run.js
function group (line 41) | function group(name) {
function groupEnd (line 55) | function groupEnd() {
function log (line 64) | function log(title, message) {
function report (line 113) | function report(state, code, message) {
function outputStats (line 132) | function outputStats(name, stats) {
FILE: test/tests-numeric-separators.js
function bigint (line 8) | function bigint(str) {
FILE: test/tests.js
function Bear (line 29027) | function Bear(x,y,z) {
function Cat (line 29035) | function Cat() {
Condensed preview — 122 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6,628K chars).
[
{
"path": ".editorconfig",
"chars": 99,
"preview": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = true\n"
},
{
"path": ".gitattributes",
"chars": 14,
"preview": "* text eol=lf\n"
},
{
"path": ".github/workflows/ci.yml",
"chars": 789,
"preview": "# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json\n\nname: ci\n\non:\n pull_request:\n bra"
},
{
"path": ".gitignore",
"chars": 100,
"preview": ".DS_Store\n.tern-port\n/node_modules\n/local\n/acorn/dist\n/acorn-loose/dist\n/acorn-walk/dist\n/yarn.lock\n"
},
{
"path": ".mailmap",
"chars": 168,
"preview": "Adrian Heine <mail@adrianheine.de>\nAlistair Braidwood <alistair_braidwood@yahoo.co.uk>\nForbes Lindesay <forbes@lindesay."
},
{
"path": ".npmignore",
"chars": 165,
"preview": "/.tern-port\n/test\n/local\n/rollup\n/bin/generate-identifier-regex.js\n/bin/update_authors.sh\n.editorconfig\n.gitattributes\n."
},
{
"path": ".npmrc",
"chars": 19,
"preview": "package-lock = true"
},
{
"path": ".nvmrc",
"chars": 3,
"preview": "22\n"
},
{
"path": ".tern-project",
"chars": 63,
"preview": "{\n \"plugins\": {\n \"node\": true,\n \"es_modules\": true\n }\n}"
},
{
"path": "AUTHORS",
"chars": 1775,
"preview": "List of Acorn contributors. Updated before every release.\n\nadams85\nAdam Walsh\nAdrian Heine\nAdrian Rakovsky\nAlex\nAlistair"
},
{
"path": "README.md",
"chars": 3600,
"preview": "# <img src=\"https://raw.githubusercontent.com/acornjs/acorn/refs/heads/master/logo.svg\" alt=\"Acorn Logo\" width=\"100\"> Ac"
},
{
"path": "acorn/.npmignore",
"chars": 30,
"preview": ".tern-*\n/rollup.config.*\n/src\n"
},
{
"path": "acorn/CHANGELOG.md",
"chars": 23835,
"preview": "## 8.16.0 (2026-02-19)\n\n### New features\n\nThe `sourceType` option can now be set to `\"commonjs\"` to have the parser trea"
},
{
"path": "acorn/LICENSE",
"chars": 1099,
"preview": "MIT License\n\nCopyright (C) 2012-2022 by various contributors (see AUTHORS)\n\nPermission is hereby granted, free of charge"
},
{
"path": "acorn/README.md",
"chars": 11389,
"preview": "# Acorn\n\nA tiny, fast JavaScript parser written in JavaScript.\n\n## Community\n\nAcorn is open source software released und"
},
{
"path": "acorn/bin/acorn",
"chars": 60,
"preview": "#!/usr/bin/env node\n\"use strict\"\n\nrequire(\"../dist/bin.js\")\n"
},
{
"path": "acorn/package.json",
"chars": 1061,
"preview": "{\n \"name\": \"acorn\",\n \"description\": \"ECMAScript parser\",\n \"homepage\": \"https://github.com/acornjs/acorn\",\n \"main\": \""
},
{
"path": "acorn/rollup.config.mjs",
"chars": 912,
"preview": "import {readFile, writeFile} from \"node:fs/promises\"\nimport buble from \"@rollup/plugin-buble\"\n\nconst copy = (from, to) ="
},
{
"path": "acorn/src/acorn.d.ts",
"chars": 22012,
"preview": "export interface Node {\n start: number\n end: number\n type: string\n range?: [number, number]\n loc?: SourceLocation |"
},
{
"path": "acorn/src/bin/acorn.js",
"chars": 2609,
"preview": "import {basename} from \"path\"\nimport {readFileSync as readFile} from \"fs\"\nimport * as acorn from \"acorn\"\n\nlet inputFileP"
},
{
"path": "acorn/src/expression.js",
"chars": 44206,
"preview": "// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling thos"
},
{
"path": "acorn/src/generated/astralIdentifierCodes.js",
"chars": 1243,
"preview": "// This file was generated. Do not modify manually!\nexport default [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3,"
},
{
"path": "acorn/src/generated/astralIdentifierStartCodes.js",
"chars": 2299,
"preview": "// This file was generated. Do not modify manually!\nexport default [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70"
},
{
"path": "acorn/src/generated/nonASCIIidentifierChars.js",
"chars": 2732,
"preview": "// This file was generated. Do not modify manually!\nexport default \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u05"
},
{
"path": "acorn/src/generated/nonASCIIidentifierStartChars.js",
"chars": 4314,
"preview": "// This file was generated. Do not modify manually!\nexport default \"\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02"
},
{
"path": "acorn/src/generated/scriptValuesAddedInUnicode.js",
"chars": 332,
"preview": "// This file was generated by \"bin/generate-unicode-script-values.js\". Do not modify manually!\nexport default \"Berf Beri"
},
{
"path": "acorn/src/identifier.js",
"chars": 3322,
"preview": "// These are a run-length and offset encoded representation of the\n// >0xffff code points that are a valid part of ident"
},
{
"path": "acorn/src/index.js",
"chars": 2548,
"preview": "// Acorn is a tiny, fast JavaScript parser written in JavaScript.\n//\n// Acorn was written by Marijn Haverbeke, Ingvar St"
},
{
"path": "acorn/src/location.js",
"chars": 862,
"preview": "import {Parser} from \"./state.js\"\nimport {Position, getLineInfo} from \"./locutil.js\"\n\nconst pp = Parser.prototype\n\n// Th"
},
{
"path": "acorn/src/locutil.js",
"chars": 978,
"preview": "import {nextLineBreak} from \"./whitespace.js\"\n\n// These are used when `options.locations` is on, for the\n// `startLoc` a"
},
{
"path": "acorn/src/lval.js",
"chars": 11065,
"preview": "import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {hasOwn} from \"./util.js\"\nimport {BI"
},
{
"path": "acorn/src/node.js",
"chars": 1361,
"preview": "import {Parser} from \"./state.js\"\nimport {SourceLocation} from \"./locutil.js\"\n\nexport class Node {\n constructor(parser,"
},
{
"path": "acorn/src/options.js",
"chars": 7017,
"preview": "import {hasOwn, isArray} from \"./util.js\"\nimport {SourceLocation} from \"./locutil.js\"\n\n// A second argument must be give"
},
{
"path": "acorn/src/package.json",
"chars": 23,
"preview": "{\n \"type\": \"module\"\n}\n"
},
{
"path": "acorn/src/parseutil.js",
"chars": 4878,
"preview": "import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {lineBreak, skipWhiteSpace} from \"./"
},
{
"path": "acorn/src/regexp.js",
"chars": 40636,
"preview": "import {isIdentifierStart, isIdentifierChar} from \"./identifier.js\"\nimport {Parser} from \"./state.js\"\nimport UNICODE_PRO"
},
{
"path": "acorn/src/scope.js",
"chars": 3589,
"preview": "import {Parser} from \"./state.js\"\nimport {\n SCOPE_VAR, SCOPE_FUNCTION, SCOPE_TOP, SCOPE_ARROW, SCOPE_SIMPLE_CATCH, BIND"
},
{
"path": "acorn/src/scopeflags.js",
"chars": 987,
"preview": "// Each scope gets a bitset that may contain these flags\nexport const\n SCOPE_TOP = 1,\n SCOPE_FUNCTION = 2,\n SCO"
},
{
"path": "acorn/src/state.js",
"chars": 6262,
"preview": "import {reservedWords, keywords} from \"./identifier.js\"\nimport {types as tt} from \"./tokentype.js\"\nimport {lineBreak} fr"
},
{
"path": "acorn/src/statement.js",
"chars": 42215,
"preview": "import {types as tt} from \"./tokentype.js\"\nimport {Parser} from \"./state.js\"\nimport {lineBreak, skipWhiteSpace} from \"./"
},
{
"path": "acorn/src/tokencontext.js",
"chars": 5231,
"preview": "// The algorithm used to determine whether a regexp can appear at a\n// given point in the program is loosely based on sw"
},
{
"path": "acorn/src/tokenize.js",
"chars": 26424,
"preview": "import {isIdentifierStart, isIdentifierChar} from \"./identifier.js\"\nimport {types as tt, keywords as keywordTypes} from "
},
{
"path": "acorn/src/tokentype.js",
"chars": 5599,
"preview": "// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store"
},
{
"path": "acorn/src/unicode-property-data.js",
"chars": 6662,
"preview": "import {wordsRegexp} from \"./util.js\"\nimport scriptValuesAddedInUnicode from \"./generated/scriptValuesAddedInUnicode.js\""
},
{
"path": "acorn/src/util.js",
"chars": 704,
"preview": "const {hasOwnProperty, toString} = Object.prototype\n\nexport const hasOwn = Object.hasOwn || ((obj, propName) => (\n hasO"
},
{
"path": "acorn/src/whitespace.js",
"chars": 737,
"preview": "// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\n\nexport const line"
},
{
"path": "acorn-loose/.npmignore",
"chars": 30,
"preview": ".tern-*\n/rollup.config.*\n/src\n"
},
{
"path": "acorn-loose/CHANGELOG.md",
"chars": 3247,
"preview": "## 8.5.2 (2025-07-01)\n\n### Bug fixes\n\nUse the proper version of `acorn` as a dependency.\n\n## 8.5.1 (2025-06-08)\n\n### Bug"
},
{
"path": "acorn-loose/LICENSE",
"chars": 1099,
"preview": "MIT License\n\nCopyright (C) 2012-2020 by various contributors (see AUTHORS)\n\nPermission is hereby granted, free of charge"
},
{
"path": "acorn-loose/README.md",
"chars": 2173,
"preview": "# Acorn loose parser\n\nAn error-tolerant JavaScript parser written in JavaScript.\n\nThis parser will parse _any_ text into"
},
{
"path": "acorn-loose/package.json",
"chars": 1127,
"preview": "{\n \"name\": \"acorn-loose\",\n \"description\": \"Error-tolerant ECMAScript parser\",\n \"homepage\": \"https://github.com/acornj"
},
{
"path": "acorn-loose/rollup.config.mjs",
"chars": 777,
"preview": "import {readFile, writeFile} from \"node:fs/promises\"\nimport buble from \"@rollup/plugin-buble\"\n\nconst copy = (from, to) ="
},
{
"path": "acorn-loose/src/acorn-loose.d.ts",
"chars": 346,
"preview": "import * as acorn from \"acorn\"\n\nexport const LooseParser: typeof acorn.Parser\n\nexport function parse (input: string, opt"
},
{
"path": "acorn-loose/src/expression.js",
"chars": 21427,
"preview": "import {LooseParser} from \"./state.js\"\nimport {isDummy} from \"./parseutil.js\"\nimport {tokTypes as tt, tokContexts as tok"
},
{
"path": "acorn-loose/src/index.js",
"chars": 1629,
"preview": "// Acorn: Loose parser\n//\n// This module provides an alternative parser that exposes that same\n// interface as the main "
},
{
"path": "acorn-loose/src/package.json",
"chars": 23,
"preview": "{\n \"type\": \"module\"\n}\n"
},
{
"path": "acorn-loose/src/parseutil.js",
"chars": 97,
"preview": "export const dummyValue = \"✖\"\n\nexport function isDummy(node) { return node.name === dummyValue }\n"
},
{
"path": "acorn-loose/src/state.js",
"chars": 4329,
"preview": "import {Parser, SourceLocation, tokTypes as tt, Node, lineBreak, isNewLine} from \"acorn\"\nimport {dummyValue} from \"./par"
},
{
"path": "acorn-loose/src/statement.js",
"chars": 20401,
"preview": "import {LooseParser} from \"./state.js\"\nimport {isDummy} from \"./parseutil.js\"\nimport {getLineInfo, tokTypes as tt} from "
},
{
"path": "acorn-loose/src/tokenize.js",
"chars": 3834,
"preview": "import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from \"acorn\"\nimport {LooseParser} fro"
},
{
"path": "acorn-walk/.npmignore",
"chars": 30,
"preview": ".tern-*\n/rollup.config.*\n/src\n"
},
{
"path": "acorn-walk/CHANGELOG.md",
"chars": 3913,
"preview": "## 8.3.5 (2026-02-19)\n\n### Bug fixes\n\nEmit a more informative error message when trying to walk a node type that has no "
},
{
"path": "acorn-walk/LICENSE",
"chars": 1099,
"preview": "MIT License\n\nCopyright (C) 2012-2020 by various contributors (see AUTHORS)\n\nPermission is hereby granted, free of charge"
},
{
"path": "acorn-walk/README.md",
"chars": 4467,
"preview": "# Acorn AST walker\n\nAn abstract syntax tree walker for the\n[ESTree](https://github.com/estree/estree) format.\n\n## Commun"
},
{
"path": "acorn-walk/package.json",
"chars": 1074,
"preview": "{\n \"name\": \"acorn-walk\",\n \"description\": \"ECMAScript (ESTree) AST walker\",\n \"homepage\": \"https://github.com/acornjs/a"
},
{
"path": "acorn-walk/rollup.config.mjs",
"chars": 638,
"preview": "import {readFile, writeFile} from \"node:fs/promises\"\nimport buble from \"@rollup/plugin-buble\"\n\nconst copy = (from, to) ="
},
{
"path": "acorn-walk/src/index.js",
"chars": 13181,
"preview": "// AST walker module for ESTree compatible trees\n\n// A simple walk is one where you simply specify callbacks to be\n// ca"
},
{
"path": "acorn-walk/src/package.json",
"chars": 23,
"preview": "{\n \"type\": \"module\"\n}\n"
},
{
"path": "acorn-walk/src/walk.d.ts",
"chars": 5601,
"preview": "import * as acorn from \"acorn\"\n\nexport type FullWalkerCallback<TState> = (\n node: acorn.AnyNode,\n state: TState,\n typ"
},
{
"path": "bin/generate-identifier-regex.js",
"chars": 2391,
"preview": "\"use strict\"\n\nconst fs = require(\"fs\")\nconst path = require(\"path\")\nconst pkg = require(\"../package.json\")\nconst depende"
},
{
"path": "bin/generate-unicode-script-values.js",
"chars": 1932,
"preview": "\"use strict\"\n\nconst fs = require(\"fs\")\nconst path = require(\"path\")\n\nimport(\"../acorn/src/unicode-property-data.js\")\n ."
},
{
"path": "bin/run_test262.js",
"chars": 726,
"preview": "const fs = require(\"fs\")\nconst path = require(\"path\")\nconst run = require(\"test262-parser-runner\")\nconst parse = require"
},
{
"path": "bin/test262.unsupported-features",
"chars": 45,
"preview": "decorators\nimport-defer\nsource-phase-imports\n"
},
{
"path": "bin/test262.whitelist",
"chars": 2899,
"preview": "staging/explicit-resource-management/await-using-in-switch-case-block.js (default)\nstaging/explicit-resource-management/"
},
{
"path": "bin/update_authors.sh",
"chars": 136,
"preview": "echo \"List of Acorn contributors. Updated before every release.\" > AUTHORS\necho >> AUTHORS\ngit log --format='%aN' | sort"
},
{
"path": "eslint.config.mjs",
"chars": 1704,
"preview": "import js from \"@eslint/js\"\nimport neostandard from \"neostandard\"\nimport importPlugin from \"eslint-plugin-import\"\n\nexpor"
},
{
"path": "package.json",
"chars": 1711,
"preview": "{\n \"maintainers\": [\n {\n \"name\": \"Marijn Haverbeke\",\n \"email\": \"marijnh@gmail.com\",\n \"web\": \"http://ma"
},
{
"path": "test/bench/common.js",
"chars": 2421,
"preview": "'use strict';\n\nconst isWorker = typeof importScripts !== 'undefined';\n\n// var because must leak into globals\nvar module,"
},
{
"path": "test/bench/fixtures/angular.js",
"chars": 1232365,
"preview": "/**\n * @license AngularJS v1.6.1\n * (c) 2010-2016 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window"
},
{
"path": "test/bench/fixtures/backbone.js",
"chars": 72236,
"preview": "// Backbone.js 1.3.3\n\n// (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// "
},
{
"path": "test/bench/fixtures/ember.js",
"chars": 1853749,
"preview": ";(function() {\n/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2017 Tilde Inc. a"
},
{
"path": "test/bench/fixtures/jquery.js",
"chars": 268039,
"preview": "/*!\n * jQuery JavaScript Library v3.2.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * C"
},
{
"path": "test/bench/fixtures/react-dom.js",
"chars": 646420,
"preview": " /**\n * ReactDOM v15.5.4\n */\n\n;(function(f) {\n // CommonJS\n if (typeof exports === \"object\" && typeof module !== \"un"
},
{
"path": "test/bench/fixtures/react.js",
"chars": 136397,
"preview": " /**\n * React v15.5.4\n */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}e"
},
{
"path": "test/bench/index.html",
"chars": 4185,
"preview": "<!doctype html>\n<head>\n <meta charset=\"utf-8\">\n <title>Acorn benchmark</title>\n <style>\n table {\n border-coll"
},
{
"path": "test/bench/index.js",
"chars": 1316,
"preview": "'use strict';\n\nconst BenchTable = require('benchtable');\nconst { parsers, parserNames, inputs, inputNames } = require('."
},
{
"path": "test/bench/package.json",
"chars": 702,
"preview": "{\n \"name\": \"acorn-benchmarks\",\n \"description\": \"Acorn benchmarks meta-package\",\n \"version\": \"0.0.0\",\n \"private\": tru"
},
{
"path": "test/bench/worker.js",
"chars": 1889,
"preview": "'use strict';\n\nimportScripts('common.js');\n\nconst Benchmark = req('benchmark').runInContext({\n _: req('lodash')\n});\n\npo"
},
{
"path": "test/driver.js",
"chars": 3311,
"preview": "var tests = [];\n\nexports.test = function(code, ast, options) {\n tests.push({code: code, ast: ast, options: options});\n}"
},
{
"path": "test/run.js",
"chars": 4698,
"preview": "(function() {\n var driver = require(\"./driver.js\")\n require(\"./tests.js\");\n require(\"./tests-harmony.js\");\n require("
},
{
"path": "test/tests-async-iteration.js",
"chars": 61702,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-asyncawait.js",
"chars": 109907,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-await-top-level.js",
"chars": 1744,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-bigint.js",
"chars": 4698,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test;\n var testFail = require(\"./driver.js\")."
},
{
"path": "test/tests-class-features-2022.js",
"chars": 163166,
"preview": "if (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = driver"
},
{
"path": "test/tests-commonjs.js",
"chars": 2722,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-directive.js",
"chars": 33893,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test;\n var testFail ="
},
{
"path": "test/tests-dynamic-import.js",
"chars": 5469,
"preview": "// Tests for ECMAScript 2020 dynamic import\n\nif (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").t"
},
{
"path": "test/tests-es7.js",
"chars": 8394,
"preview": "// Tests for ECMAScript 7 syntax changes\n\nif (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test"
},
{
"path": "test/tests-export-all-as-ns-from-source.js",
"chars": 2740,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-export-named.js",
"chars": 5174,
"preview": "// Tests for `ExportNamedDeclaration`\n\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n va"
},
{
"path": "test/tests-harmony.js",
"chars": 404719,
"preview": "/*\n Copyright (C) 2015 Ingvar Stepanyan <me@rreverser.com>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>"
},
{
"path": "test/tests-import-attributes.js",
"chars": 18218,
"preview": "/* eslint quote-props: [\"error\", \"as-needed\"] */\n/* eslint quotes: [\"error\", \"double\", { \"avoidEscape\": true }] */\nif (t"
},
{
"path": "test/tests-import-meta.js",
"chars": 3497,
"preview": "// Tests for ECMAScript 2020 `import.meta`\n\nif (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").te"
},
{
"path": "test/tests-json-superset.js",
"chars": 553,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-logical-assignment-operators.js",
"chars": 3965,
"preview": "// Tests for ECMAScript 2021 `&&=`, `||=`, `??=`\n\nif (typeof exports !== \"undefined\") {\n var test = require(\"./driver.j"
},
{
"path": "test/tests-module-string-names.js",
"chars": 7450,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test;\n var testFail = require(\"./driver.js\")."
},
{
"path": "test/tests-nullish-coalescing.js",
"chars": 12320,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-numeric-separators.js",
"chars": 4038,
"preview": "// Tests for ECMAScript 2021 Numeric Separators\n\nif (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js"
},
{
"path": "test/tests-optional-catch-binding.js",
"chars": 640,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n}\n\ntest(\"try {} catch {}\", {\n type: \"Pro"
},
{
"path": "test/tests-optional-chaining.js",
"chars": 33504,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-regexp-2018.js",
"chars": 11993,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-regexp-2020.js",
"chars": 1060,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-regexp-2022.js",
"chars": 315,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-regexp-2024.js",
"chars": 6473,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-regexp-2025.js",
"chars": 4022,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-regexp.js",
"chars": 77002,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-rest-spread-properties.js",
"chars": 38315,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-template-literal-revision.js",
"chars": 11522,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests-trailing-commas-in-func.js",
"chars": 20034,
"preview": "\nif (typeof exports !== \"undefined\") {\n var driver = require(\"./driver.js\");\n var test = driver.test, testFail = drive"
},
{
"path": "test/tests-using.js",
"chars": 66811,
"preview": "if (typeof exports !== \"undefined\") {\n var test = require(\"./driver.js\").test\n var testFail = require(\"./driver.js\").t"
},
{
"path": "test/tests.js",
"chars": 560096,
"preview": "// Tests largely based on those of Esprima\n// (http://esprima.org/test/)\n\nif (typeof exports !== \"undefined\") {\n var dr"
}
]
About this extraction
This page contains the full source code of the acornjs/acorn GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 122 files (6.0 MB), approximately 1.6M tokens, and a symbol index with 2192 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.