Expand description
Bounded, lossless ECMAScript 2026 Script and Module frontend.
The public model is deliberately neutral syntax data. It has no compiler IR,
runtime, TypeScript, Shape, or kernel dependency. Parser extensions can wrap
Node and attach their own Origin without changing JavaScript syntax.
The frozen downstream extension seam is exactly Token, SyntaxTree,
Node, Origin, and JavascriptBuilder. It carries syntax and
lowering data only; TypeScript policy remains a one-way downstream concern.
Structs§
- Diagnostic
- Deterministic located frontend failure.
- Javascript
Builder - Public construction seam for JavaScript and syntax extensions.
- Javascript
Codec - Runtime codec object for
codec/javascript. - Javascript
Codec Lib - Host-registered library installing
codec/javascript. - Limits
- Resource limits shared by lexing and parsing.
- Node
- A concrete node covering a contiguous token range.
- Origin
- Source identity attachable by JavaScript or downstream syntax extensions.
- Span
- Half-open UTF-8 byte range in the original source.
- Syntax
Tree - Complete lossless syntax tree.
- Token
- A lossless lexical token. Text is recovered using
Token::span.
Enums§
- Asi
- Evidence for an explicit or automatic semicolon boundary.
- Diagnostic
Code - Stable diagnostic category.
- Goal
- Script or Module syntactic goal.
- Lexical
Goal - Parser-selected lexical goal governing slash and template recognition.
- Node
Kind - Neutral concrete-tree node category, stable for downstream extensions.
- Token
Kind - Kind of lossless token.
Constants§
- CORPUS_
MANIFEST_ SHA256 - SHA-256 of the checked source corpus manifest.
- ECMA262_
AUTHORITY - Immutable specification authority used by this frontend.
- ECMA262_
EDITION - Frozen ECMA-262 edition.
- ECMA262_
FROZEN_ ON - Date on which the edition identity and grammar inventory were frozen.
- JAVASCRIPT_
CODEC_ ID - Stable local id used before a host assigns
codec/javascriptan id. - TEST262_
REVISION - Frozen Test262 evidence corpus revision. Test262 is an oracle, not a dependency.
Functions§
- decode_
javascript - Decode Script source using the shared codec budget.
- decode_
javascript_ located - Decode into a root-located expression.
- decode_
javascript_ tree - Decode into a recursively located expression tree.
- encode_
javascript - Canonically encode lowered forms or the established tagged fallback.
- lower_
javascript - Lower a complete tree to stable
javascript/*forms. - parse_
module - Parses a Module with default bounds.
- parse_
module_ with_ limits - Parses a Module with explicit bounds.
- parse_
script - Parses a Script with default bounds.
- parse_
script_ with_ limits - Parses a Script with explicit bounds.
- tokenize
- Tokenizes with default limits, selecting slash goals from preceding tokens.
- tokenize_
with_ limits - Tokenizes with explicit resource limits.