Struct ucglib::build::Builder [−][src]
Handles building ucg code.
Fields
last: Option<Rc<Val>>
last is the result of the last statement.
Methods
impl Builder
[src]
impl Builder
pub fn new<P: Into<PathBuf>>(root: P) -> Self
[src]
pub fn new<P: Into<PathBuf>>(root: P) -> Self
Constructs a new Builder.
pub fn new_with_scope<P: Into<PathBuf>>(
root: P,
scope: HashMap<Positioned<String>, Rc<Val>>
) -> Self
[src]
pub fn new_with_scope<P: Into<PathBuf>>(
root: P,
scope: HashMap<Positioned<String>, Rc<Val>>
) -> Self
Constructs a new Builder with a provided scope.
pub fn new_with_env_and_scope<P: Into<PathBuf>>(
root: P,
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Rc<Val>
) -> Self
[src]
pub fn new_with_env_and_scope<P: Into<PathBuf>>(
root: P,
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Rc<Val>
) -> Self
pub fn get_out_by_name(&self, name: &str) -> Option<Rc<Val>>
[src]
pub fn get_out_by_name(&self, name: &str) -> Option<Rc<Val>>
Returns a Val by name from previously built UCG.
pub fn enable_validate_mode(&mut self)
[src]
pub fn enable_validate_mode(&mut self)
Puts the builder in validation mode.
Among other things this means that assertions will be evaluated and their results will be saved in a report for later output.
pub fn build(&mut self, ast: &Vec<Statement>) -> Result<(), Box<Error>>
[src]
pub fn build(&mut self, ast: &Vec<Statement>) -> Result<(), Box<Error>>
Builds a list of parsed UCG Statements.
pub fn eval_string(&mut self, input: &str) -> Result<Rc<Val>, Box<Error>>
[src]
pub fn eval_string(&mut self, input: &str) -> Result<Rc<Val>, Box<Error>>
pub fn build_file_string(&mut self, input: String) -> Result<(), Box<Error>>
[src]
pub fn build_file_string(&mut self, input: String) -> Result<(), Box<Error>>
Builds a string of ucg syntax.
pub fn build_file(&mut self, name: &str) -> Result<(), Box<Error>>
[src]
pub fn build_file(&mut self, name: &str) -> Result<(), Box<Error>>
Builds a ucg file at the named path.
pub fn eval_expr(&self, expr: &Expression) -> Result<Rc<Val>, Box<Error>>
[src]
pub fn eval_expr(&self, expr: &Expression) -> Result<Rc<Val>, Box<Error>>