Skip to content

@lanexio/parser-pure

This page documents @lanexio/parser-pure, the pure TypeScript fallback backend package. This is a private package (not published to npm independently) that serves as the universal pure-TS bridge for grammar packages.

  • Version: Internal
  • Module name: parser-pure
  • Package: @lanexio/parser-pure (private)
  • Import path: @lanexio/parser-pure
  • Layer: 4 (Bridge)
  • Runtime: Universal
  • Module format: ESM
  • Stability: Internal (private package, not for direct public use)
  • Primary use case: Pure TypeScript bridge adapter over grammar parsing functions.
  • You need a pure TypeScript parser bridge that does not require WASM.
  • You are building on top of Lanexio Parser and need a unified PureParser interface.
  • You are evaluating the internal architecture.
BoundaryDescription
InputsUint8Array (source bytes)
OutputsLexTree
Side effectsNone
DeterminismYes
External dependencies@lanexio/parser-core, @lanexio/parser-grammar-html, @lanexio/parser-grammar-markdown
Never-throw guaranteeYes (delegates to grammar parse functions)
Security surfaceNone (delegates to grammar parsers)

This is a private package. It is not published to npm independently. It is used internally by the @lanexio/parser and @lanexio/parser-wasm packages.

If you need pure TypeScript parsing, use the grammar packages directly or @lanexio/parser.

ExportTypeDescription
createPureParser() => PureParserCreate a pure TypeScript parser facade backed by the toy grammar.
createHtmlPureParser() => PureParserCreate a pure TypeScript parser facade backed by the HTML grammar.
createMarkdownPureParser() => PureParserCreate a pure TypeScript parser facade backed by the Markdown grammar (GFM enabled).
parseHtml(bytes: Uint8Array) => LexTreeParse HTML bytes. Delegates to @lanexio/parser-grammar-html.
parseMarkdown(bytes: Uint8Array) => LexTreeParse Markdown bytes (GFM enabled). Delegates to @lanexio/parser-grammar-markdown.
toyParse(bytes: Uint8Array) => LexTreeToy grammar parse. Re-exported from parser-core.
LexNodeclassRe-exported from parser-core.
LexToyKindconst objectRe-exported from parser-core.
LexTreeclassRe-exported from parser-core.

No options. Each parser function accepts only Uint8Array.

TypePurposeNotes
PureParserParser shape exposed by the pure TS fallback backend{ readonly runtime: "pure-ts"; readonly parse: (bytes: Uint8Array) => LexTree }
LexRangeByte rangeRe-exported from parser-core
LexToyKindTypeToy kind typeRe-exported from parser-core
  • No direct accessibility surface. This is an internal bridge package.
ConcernStatus
Generated output semanticsNot applicable (internal bridge)
ARIA attributes in serialized outputNot applicable
Semantic element round-tripNot applicable
  • All parse functions delegate to grammar-specific parsers which carry the never-throw guarantee.
ThreatMitigationStatus
Malformed input byte sequenceDelegates to grammar parsers (panic-free)Implemented
PackageRelationshipLayerNotes
@lanexio/parser-coreRequires1Core tree and protocol
@lanexio/parser-grammar-htmlRequires2HTML grammar delegation
@lanexio/parser-grammar-markdownRequires2Markdown grammar delegation
@lanexio/parserConsumes6Entry point uses pure as fallback
@lanexio/parser-wasmConsumes4WASM falls back to pure
VersionDateStatusNotable changes
1.0.02026-05-29CurrentInitial stable release. Private package.
  • This package is internal and private. Do not depend on it directly in production code.