API Reference anantha_dot_prompt v#1.1.0
Copy MarkdownModules
Main API for dot-prompt.
AST node handlers for the DotPrompt compiler.
ETS-based cache for static fragment compilation.
ETS-based cache for structural skeleton with precise invalidation support.
ETS-based cache for vary branch content.
Compiles DotPrompt (.prompt) template files into rendered output.
Resolves case blocks by matching variables against branches.
Context struct for the dot-prompt compiler to reduce function arity.
Expands fragment collections via _index.prompt logic.
Expands dynamic fragments {{}}. These interpolate runtime variables from params. Dynamic fragments are NOT cached - they're evaluated fresh each request.
Expands static fragments by compiling them.
Resolves if/elif/else conditions using natural language operators.
Collects response blocks from AST and derives schema.
Resolves vary slots after structural compilation using an efficient single-pass approach.
Polls GitHub for changes in prompt files.
Fills runtime variable placeholders using an efficient single-pass injection strategy.
Tokenizes .prompt files line by line.
Represents a single token from the lexer.
Builds an AST from tokens.
Walks the AST checking types, bounds, nesting depth, and params.
Result struct returned from compile/render operations.
Emits telemetry events.
Tracks and manages versions of prompts.