RustQ.Rust.AST (rustq v1.0.0-rc.19)

Copy Markdown View Source

Small Rust AST/IR used by macro frontends before final RustQ validation.

This is intentionally much smaller than Rust's full grammar. It captures the Rust-shaped nodes that RustQ.Meta.defrust/2 can produce from valid Elixir AST, then renders them only at the final fragment-validation boundary.

Summary

Types

Rust expression nodes supported by RustQ's compact AST.

Rust item nodes supported by RustQ's compact AST.

Rust pattern nodes supported by RustQ's compact AST.

Rust statement nodes supported by RustQ's compact AST.

Rust type nodes supported by RustQ's compact AST.

Functions

Lists every RustQ AST node module, which RustQ.Rust.AST.Schema and walking read.

Returns whether a value is a structural Rust expression node.

Returns whether a value is a structural Rust pattern node.

Returns whether a value is a structural Rust type node.

Types

expr()

Rust expression nodes supported by RustQ's compact AST.

item()

Rust item nodes supported by RustQ's compact AST.

macro_token()

pat()

Rust pattern nodes supported by RustQ's compact AST.

stmt()

Rust statement nodes supported by RustQ's compact AST.

type()

Rust type nodes supported by RustQ's compact AST.

vis()

@type vis() :: :pub | :crate | nil

Functions

__rustq_ast_modules__()

Lists every RustQ AST node module, which RustQ.Rust.AST.Schema and walking read.

expr_node?(term)

@spec expr_node?(term()) :: boolean()

Returns whether a value is a structural Rust expression node.

pat_node?(term)

@spec pat_node?(term()) :: boolean()

Returns whether a value is a structural Rust pattern node.

type_node?(term)

@spec type_node?(term()) :: boolean()

Returns whether a value is a structural Rust type node.