Skip to main content

Crate vize_l4

Crate vize_l4 

Source
Expand description

L4 — emission (codename: Stesura).

Experimental (#6840). The module layout follows the #6840 design. The writer, prepared-fragment module assembler and checked supported-expression consumer are implemented. Full binding/grammar and targets remain unfinished; no product selects a complete native route.

L4 writes output text directly. There is no JS AST plus codegen step:

  • write — the one append-only write::Writer every target uses: indentation, the used-helper set, and span links that cost nothing when the writer does not record. Preambles are assembled last, so nothing is inserted into the middle of the text.
  • expr — expression rewriting by span from the L2 identifier-resolution table. Expressions are parsed once, in L1; L4 never reparses them.
  • runtime — helper vocabulary for pinned DOM, SSR and Vapor releases.
  • module — SFC module assembly (imports, hoists, script, render, exports) into one writer, so one source map covers the whole module.
  • targets — the DOM, SSR and Vapor emitters and the type-check projection.

Dependencies are level crates (L0, L2, L3) plus serde_json for Source Map v3 serialization. The production compiler keeps its own emission document until its fix-history gate closes (#6880).

Modules§

expr
Write checked retained-expression facts directly, without parsing/searching.
jsx
Whole native JavaScript JSX modules from the retained original File owner.
module
Assemble prepared script and target fragments into one SFC module.
runtime
The runtime helper vocabulary.
targets
Emission targets. Each writes text directly into a crate::write::Writer.
write
The one append-only writer every L4 target uses.