Skip to main content

compile

Function compile 

Source
pub fn compile(source: &str) -> Result<SceneDocument, Diagnostic>
Expand description

Compiles bounded Konjure DSL source into a validated scene document.

The compiler allocates tokens and document-owned strings and reports source locations in Diagnostic::span when parsing fails. It does not perform I/O or execute actions.

§Errors

Returns a diagnostic for invalid syntax, unsupported units, source larger than MAX_SOURCE_BYTES, or a document rejected by validate.