Add cell paths

This commit is contained in:
JT
2021-09-07 10:02:24 +12:00
parent f71b7e89e0
commit 3b7d7861e3
12 changed files with 395 additions and 99 deletions

View File

@ -102,6 +102,11 @@ pub fn eval_expression(
Expr::Var(var_id) => context
.get_var(*var_id)
.map_err(move |_| ShellError::VariableNotFoundAtRuntime(expr.span)),
Expr::FullCellPath(column_path) => {
let value = eval_expression(context, &column_path.head)?;
value.follow_column_path(&column_path.tail)
}
Expr::Call(call) => eval_call(context, call, Value::nothing()),
Expr::ExternalCall(_, _) => Err(ShellError::ExternalNotSupported(expr.span)),
Expr::Operator(_) => Ok(Value::Nothing { span: expr.span }),