Add wrap and get and cell_path parsing

This commit is contained in:
JT
2021-10-02 15:59:11 +13:00
parent 3567bbbf32
commit 5843acec02
18 changed files with 290 additions and 81 deletions

View File

@ -156,6 +156,10 @@ pub fn eval_expression(
Expr::Var(var_id) => context
.get_var(*var_id)
.map_err(move |_| ShellError::VariableNotFoundAtRuntime(expr.span)),
Expr::CellPath(cell_path) => Ok(Value::CellPath {
val: cell_path.clone(),
span: expr.span,
}),
Expr::FullCellPath(cell_path) => {
let value = eval_expression(context, &cell_path.head)?;