pub fn compile(source: &str) -> Result<Program>Expand description
Compiles a single .bub source string into a Program.
Jump and detour targets are validated immediately; a
crate::DialogueError::Validation error is returned for any reference
to a node that does not exist in the compiled program.
For compiling multiple source files together use compile_many.
ยงErrors
Returns crate::DialogueError::Parse if the source is malformed,
crate::DialogueError::DuplicateNode if two nodes share a title without
when: grouping conditions, or crate::DialogueError::Validation if a
jump or detour target cannot be resolved.