Improve parser

This commit is contained in:
Yehuda Katz
2019-06-04 14:42:31 -07:00
parent 45c76be4d1
commit f3bb4a03c2
13 changed files with 3689 additions and 1178 deletions

View File

@ -23,6 +23,7 @@ impl Scope {
crate fn evaluate_expr(expr: &ast::Expression, scope: &Scope) -> Result<Value, ShellError> {
use ast::*;
match expr {
Expression::Call(c) => Err(ShellError::unimplemented("Evaluating call expression")),
Expression::Leaf(l) => Ok(evaluate_leaf(l)),
Expression::Parenthesized(p) => evaluate_expr(&p.expr, scope),
Expression::Flag(f) => Ok(Value::Primitive(Primitive::String(f.print()))),