Function umbra_lang::compile[][src]

pub fn compile<'a>(
    scriptname: &str,
    script: &str,
    env: &'a Env<'a>,
    pos: Option<Pos>
) -> Result<Runnable<'a>, Error>
Expand description

Splits, tokenizes, parses, and constructs a Runnable from script. Generally not necessary to use directly.

The given environment is used to determine how to parse possible macros.

Debug output can be toggled with printout which will print split Lines when greater than 0. When greater than 1 it will also print Tokens.

Errors

Will return Err if AST::parse() resulted in an error for any expressions.