Skip to main content

Crate teksilo_parse

Crate teksilo_parse 

Source
Expand description

Parser and IR for the teksu! DSL.

Extracted from teksilo-macros so non-proc-macro consumers (notably cargo teksilo-fmt) can build on the same grammar without depending on a proc-macro = true crate. The proc-macro crate teksilo-macros depends on this crate and only owns the lowering step.

Surface:

  • parse_root — entry point. Takes a proc_macro2::TokenStream and returns a TeksiRoot.
  • ir module — IR types (TeksiRoot, TeksiElement, BodyItem, …). All fields are pub so consumers can walk and reformat the tree.
  • diag module — shared diagnostic helpers and the is_widget_builder_method / is_category_b_widget predicates used by both lowering and pretty-printing.

See engineering/docs/teksu-language-spec-v3.md for the surface language.

Re-exports§

pub use ir::BodyItem;
pub use ir::PropArg;
pub use ir::RustShape;
pub use ir::TeksiElement;
pub use ir::TeksiElse;
pub use ir::TeksiFor;
pub use ir::TeksiIf;
pub use ir::TeksiMatch;
pub use ir::TeksiMatchArm;
pub use ir::TeksiProperty;
pub use ir::TeksiRoot;

Modules§

diag
Diagnostic helpers for the teksu! macro.
ir
Intermediate representation for the teksu! DSL.

Functions§

parse_root