Allow vars and subexprs in extern args

This commit is contained in:
JT
2021-10-09 10:51:47 +13:00
parent c79dca999c
commit dea9c1482b
5 changed files with 62 additions and 22 deletions

View File

@ -67,7 +67,19 @@ pub fn flatten_expression(
let mut output = vec![(*name, FlatShape::External)];
for arg in args {
output.push((*arg, FlatShape::ExternalArg));
//output.push((*arg, FlatShape::ExternalArg));
match arg {
Expression {
expr: Expr::String(..),
span,
..
} => {
output.push((*span, FlatShape::ExternalArg));
}
_ => {
output.extend(flatten_expression(working_set, arg));
}
}
}
output