Struct ucglib::build::Builder [−][src]
Builder handles building ucg code for a single file..
Fields
last: Option<Rc<Val>>
last is the result of the last statement.
Methods
impl Builder[src]
impl Builderpub fn new<P: Into<PathBuf>>(root: P, cache: Rc<RefCell<Cache>>) -> Self[src]
pub fn new<P: Into<PathBuf>>(root: P, cache: Rc<RefCell<Cache>>) -> SelfConstructs a new Builder.
pub fn new_with_scope<P: Into<PathBuf>>(
root: P,
cache: Rc<RefCell<Cache>>,
scope: HashMap<Positioned<String>, Rc<Val>>
) -> Self[src]
pub fn new_with_scope<P: Into<PathBuf>>(
root: P,
cache: Rc<RefCell<Cache>>,
scope: HashMap<Positioned<String>, Rc<Val>>
) -> SelfConstructs a new Builder with a provided scope.
pub fn new_with_env_and_scope<P: Into<PathBuf>>(
root: P,
cache: Rc<RefCell<Cache>>,
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Rc<Val>
) -> Self[src]
pub fn new_with_env_and_scope<P: Into<PathBuf>>(
root: P,
cache: Rc<RefCell<Cache>>,
scope: HashMap<Positioned<String>, Rc<Val>>,
env: Rc<Val>
) -> Selfpub 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>>Evaluate an input string as UCG.
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>>