forked from extern/nushell
Also fix the flag params
This commit is contained in:
@ -18,6 +18,7 @@ pub enum FlatShape {
|
||||
Filepath,
|
||||
GlobPattern,
|
||||
Variable,
|
||||
Flag,
|
||||
Custom(String),
|
||||
}
|
||||
|
||||
@ -61,6 +62,12 @@ pub fn flatten_expression(
|
||||
for positional in &call.positional {
|
||||
output.extend(flatten_expression(working_set, positional));
|
||||
}
|
||||
for named in &call.named {
|
||||
output.push((named.0.span, FlatShape::Flag));
|
||||
if let Some(expr) = &named.1 {
|
||||
output.extend(flatten_expression(working_set, expr));
|
||||
}
|
||||
}
|
||||
output
|
||||
}
|
||||
Expr::ExternalCall(_, name_span, args) => {
|
||||
|
Reference in New Issue
Block a user