TLX.Emitter.Format (TLX v0.5.2)

Copy Markdown

Shared AST formatting parameterized by symbol tables.

Each emitter provides a symbol map that controls output syntax (e.g., /\ vs vs and for conjunction). The structural logic — walking the AST, handling operators, formatting literals — lives here once.

Summary

Functions

Elixir symbol table

Format an Elixir AST node into a string using the given symbol table.

Format a high-level expression (may contain {:expr, ast} wrappers, :member, :and_members, etc.).

Format a default value for variable declarations.

PlusCal symbol table (atoms are quoted)

TLA+ symbol table

Unicode symbol table

Unwrap an {:expr, ast} tuple, passing through other values.

Functions

elixir_symbols()

Elixir symbol table

format_ast(int, s)

Format an Elixir AST node into a string using the given symbol table.

format_expr(q, s)

Format a high-level expression (may contain {:expr, ast} wrappers, :member, :and_members, etc.).

format_value(val, s)

Format a default value for variable declarations.

pluscal_symbols()

PlusCal symbol table (atoms are quoted)

tla_symbols()

TLA+ symbol table

unicode_symbols()

Unicode symbol table

unwrap_expr(other)

Unwrap an {:expr, ast} tuple, passing through other values.