A high-performance JavaScript parser, tokenizer, and lexical analyzer with a focus on speed and correctness. Version 6.0.0 runs on Python >=3.10, ported from the esprima JavaScript library. Regular releases with active maintenance.
pip install esprima2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parse JavaScript source into AST and tokenize it.
Replace esprima2.parse(code) with esprima2.parseScript(code) for scripts, or esprima2.parseModule(code) for modules.
Upgrade Python to 3.10 or higher.
Use comments=True instead of comment=True.
No dependency data recorded yet.