fix overlay by handling keyword expression as just the inner expression

This commit is contained in:
Devyn Cairns 2024-07-05 05:41:08 -07:00
parent c74f821759
commit 4cf6bd6fb0

View File

@ -366,7 +366,18 @@ pub(crate) fn compile_expression(
}
Ok(())
}
Expr::Keyword(_) => Err(unexpected("Keyword")),
Expr::Keyword(kw) => {
// keyword: just pass through expr, since commands that use it and are not being
// specially handled already are often just positional anyway
compile_expression(
working_set,
builder,
&kw.expr,
redirect_modes,
in_reg,
out_reg,
)
}
Expr::ValueWithUnit(value_with_unit) => {
lit(builder, literal_from_value_with_unit(value_with_unit)?)
}