Skip to main content

Module ast_json

Module ast_json 

Source
Expand description

Stable JSON projections for parser-facing tooling.

The core AST keeps its Rust-native shape for compiler consumers. This module owns the CLI/tooling projection so harn parse --json and harn tokens --json can evolve under explicit schema versions.

Structs§

AstJsonProgram
TokenJson

Constants§

AST_JSON_SCHEMA_VERSION
TOKEN_JSON_SCHEMA_VERSION

Functions§

node_to_json
program_to_json
structural_projection
A span-free projection of program with every interpolation hole replaced by its parsed tree, so two parses compare by structure alone. grammar is the operator grammar the holes are parsed with.
token_kind_name
token_to_json
tokens_to_json