Expand description
Compilation pipeline: source text → Program.
Re-exports§
pub use ast::BinOp;pub use ast::Expr;pub use ast::IfBranch;pub use ast::LineVariant;pub use ast::Node;pub use ast::OptionItem;pub use ast::Stmt;pub use ast::TextSegment;pub use ast::UnOp;pub use lexer::Spanned;pub use lexer::Token;pub use lexer::tokenise;pub use program::Program;pub use program::VariableDecl;
Modules§
- ast
- AST types: node/statement types and expression tree - data only, no logic.
- expr
- Recursive-descent expression parser - turns a source string into an
Exprtree. - interpolation
- Shared
{expr}brace-scanning used by both the compile-time interpolation parser and the runtime translation-template evaluator. - lexer
- Logos-based lexer that tokenises
.bubsource and expression strings. - markup
- Scanner for inline markup (
[name]…[/name],[name /]) combined with{expr}interpolation. Both are parsed in one left-to-right pass. - program
Program- the compiled output of one or more.bubsources.
Functions§
- compile
- Compiles a single
.bubsource string into aProgram. - compile_
many - Compiles multiple named
.bubsources into a singleProgram. - validate
- Validates all jump and detour targets in
programrefer to existing nodes.