Crate lithos_gotmpl_engine

Crate lithos_gotmpl_engine 

Source
Expand description

Core utilities for parsing and rendering Go-style text templates in Rust.

This crate is work-in-progress: it currently provides AST inspection and a placeholder renderer while the full evaluator is implemented.

Re-exports§

pub use analyze::analyze_template;
pub use analyze::AnalysisIssue;
pub use analyze::Certainty;
pub use analyze::ControlKind;
pub use analyze::ControlUsage;
pub use analyze::FunctionCall;
pub use analyze::FunctionSource;
pub use analyze::Precision;
pub use analyze::TemplateAnalysis;
pub use analyze::TemplateCall;
pub use analyze::VariableAccess;
pub use analyze::VariableKind;
pub use ast::ActionNode;
pub use ast::Ast;
pub use ast::BindingKind;
pub use ast::Block;
pub use ast::Command;
pub use ast::CommentNode;
pub use ast::Expression;
pub use ast::IfNode;
pub use ast::Node;
pub use ast::Pipeline;
pub use ast::PipelineDeclarations;
pub use ast::RangeNode;
pub use ast::Span;
pub use ast::TextNode;
pub use ast::WithNode;
pub use lexer::Keyword;
pub use lexer::Operator;
pub use lexer::Token;
pub use lexer::TokenKind;

Modules§

analyze
ast
lexer

Structs§

EvalContext
Execution context threaded through template evaluation.
FunctionRegistry
Registry that maps helper names to callable functions.
FunctionRegistryBuilder
Helper for constructing registries before freezing them into an immutable map.
Template
Parsed template with associated AST and original source.

Enums§

Error
Unified error type for the template engine.

Functions§

coerce_number
is_empty
is_truthy
value_to_string

Type Aliases§

Function
Signature implemented by helper functions invoked from templates.