Support evaluating most expressions

Blocks, paths, and others

Plus a bunch of other infra improvements
This commit is contained in:
Yehuda Katz
2019-06-29 01:55:42 -07:00
parent 7074d3ffcc
commit 3379c23a49
13 changed files with 497 additions and 150 deletions

View File

@ -46,8 +46,8 @@ crate fn evaluate_baseline_expr(
}
}
RawExpression::Block(block) => Ok(Spanned::from_item(
Value::Block(Block::new(*block.clone(), source.clone())),
block.span(),
Value::Block(Block::new(block.clone(), source.clone(), *expr.span())),
expr.span(),
)),
RawExpression::Path(path) => {
let value = evaluate_baseline_expr(path.head(), registry, scope, source)?;