Skip to main content

Module emit

Module emit 

Source
Expand description

AST walker that emits canonical Gruel text into a Printer.

Subsequent ADR-0093 phases extend the set of nodes handled here:

  • Phase 1: smallest case (covered in lib.rs baseline).
  • Phase 2: expressions, statements, patterns, types.
  • Phase 3: top-level items (Function, StructDecl, EnumDecl, …).
  • Phase 4: comment / blank-line weaving via a trivia table.

Exhaustive matches are deliberate: a new AST node kind triggers a compile-time error here rather than silently re-emitting nothing.

Functions§

emit_ast
emit_block
emit_expr
emit_item
emit_pattern
emit_statement
emit_type_expr