Skip to main content

Module trivia

Module trivia 

Source
Expand description

Trivia scanner (ADR-0093 Phase 4).

Walks the raw source once and records // line comments and blank-line runs as a sorted vector of TriviaEntry values. The emitter consults this table to weave trivia back into the canonical output at the right position.

/// doc comments are not trivia — they are parsed onto AST nodes and emitted directly. ////+ runs are also ignored (lexer-skipped).

Structs§

LineIndex
Map byte offset → 0-based line number. Built once per source.
TriviaEntry
One scanned trivia run.
TriviaTable
Sorted-by-start trivia entries for src.

Enums§

TriviaKind