Struct pupil::expr::Expr
[−]
[src]
pub struct Expr<'a> { /* fields omitted */ }
The expression context.
Methods
impl<'a> Expr<'a>
[src]
fn new(env: &'a Env) -> Expr<'a>
Create a new expression and bind it to an environment.
fn parse(&mut self, tok: Token) -> Result<(), Error>
Parse a token.
fn feed(&mut self, input: &str) -> Result<(), Error>
Feed new input to be parsed and evaluated.
fn result(self) -> Result<Value, Error>
Finalize the expression and calculate the final result.
fn eval(self, input: &str) -> Result<Value, Error>
Convenience method combines feed
and result
.