https://github.com/oxc-project/acorn-test262
https://github.com/oxc-project/acorn-test262
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oxc-project/acorn-test262
- Owner: oxc-project
- Created: 2022-03-13T16:55:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-21T22:46:30.000Z (4 months ago)
- Last Synced: 2025-03-01T02:17:24.081Z (4 months ago)
- Language: JavaScript
- Size: 248 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [acorn] output for [test262]
Acorn is run with:
```
ecmaVersion: "latest",
sourceType: module ? "module" : "script",
preserveParens: true,
allowHashBang: true,
allowReturnOutsideFunction: true,
```Negative errors are filtered out.
Files producing the following errors are ignored:* Invalid regular expression flag.
* Unexpected token (possibility a stage 3 feature).
* Cannot parse YAML from Test262 fixture comment.`RegExp`s and `BigInt`s are serialized as `null`, because JSON does not support `BigInt`s, and
serializes `RegExp`s as `{}` (not useful).`Literal`s which are RegExps have `regex.flags` property sorted in alphabetical order, the way V8 does.
`Literal` nodes which are `BigInt`s have a `bigint` field containing the `BigInt`'s value as a string.
Similarly, `Literal` nodes which are `RegExp`s have a `regex` field containing `pattern` and `flags`.
So in both cases, the `BigInt` / `RegExp` can be reconstructed from this extra data.`Infinity` is serialized as `1e+400` - which `JSON.parse` converts back to `Infinity`.
A non-standard `hashbang` field is added to `Program`.
## Maintainance
```bash
# Change the commit sha in the init command, then:
pnpm run init
pnpm run start
git commit -m "update snapshots"
```[acorn]: https://github.com/acornjs/acorn
[test262]: https://github.com/tc39/test262