Struct ucglib::build::Builder
[−]
[src]
pub struct Builder { pub last: Option<Rc<Val>>, // some fields omitted }
Handles building ucg code.
Fields
last: Option<Rc<Val>>
last is the result of the last statement.
Methods
impl Builder
[src]
pub fn new() -> Self
[src]
Constructs a new Builder.
pub fn new_with_scope(scope: HashMap<Positioned<String>, Rc<Val>>) -> Self
[src]
Constructs a new Builder with a provided scope.
pub fn new_with_env_and_scope(
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Val
) -> Self
[src]
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Val
) -> Self
pub fn get_out_by_name(&self, name: &str) -> Option<Rc<Val>>
[src]
Returns a Val by name from previously built UCG.
pub fn build(&mut self, ast: &Vec<Statement>) -> Result<(), Box<Error>>
[src]
Builds a list of parsed UCG Statements.
pub fn eval_string(&mut self, input: &str) -> Result<Rc<Val>, Box<Error>>
[src]
pub fn build_file_string(&mut self, input: String) -> Result<(), Box<Error>>
[src]
Builds a string of ucg syntax.
pub fn build_file(&mut self, name: &str) -> Result<(), Box<Error>>
[src]
Builds a ucg file at the named path.