4 ms·
A lightweight but production-grade JavaScript parser for Rust and WebAssembly. The library fully supports ECMAScript 2024 and it outputs it's Abstract Synt
by surprisetalk 2y ago
A lightweight but production-grade JavaScript parser for Rust and WebAssembly.
The library fully supports ECMAScript 2024 and it outputs it's Abstract Syntax Tree (AST) as either normal ESTree compliant structs or as JSON using serde_json.
ESTree is a community-maintained and widely-used standard for ASTs, and is the same output as most other JavaScript parsers.
Below are listed some of the aims and achievements of this project:
Lightweight and performant.
Largely dependency-free apart from serde_json.
Compliant with the ECMAScript 2024 spec.
100% pass rate against Test262 parser tests.
Output equality tested against Acorn.