Command expression need not carry span information.

This commit is contained in:
Andrés N. Robalino
2020-08-24 20:47:58 -05:00
parent f078aacc25
commit a64cfb6285
4 changed files with 9 additions and 14 deletions

View File

@ -27,7 +27,7 @@ impl<'s> Flatten<'s> {
Expression::Block(block) => self.completion_locations(block),
Expression::Invocation(block) => self.completion_locations(block),
Expression::List(exprs) => exprs.iter().flat_map(|v| self.expression(v)).collect(),
Expression::Command(span) => vec![LocationType::Command.spanned(*span)],
Expression::Command => vec![LocationType::Command.spanned(e.span)],
Expression::Path(path) => self.expression(&path.head),
Expression::Variable(_) => vec![LocationType::Variable.spanned(e.span)],
@ -69,7 +69,7 @@ impl<'s> Flatten<'s> {
let mut result = Vec::new();
match internal.args.head.expr {
Expression::Command(_) => {
Expression::Command => {
result.push(LocationType::Command.spanned(internal.name_span));
}
Expression::Literal(Literal::String(_)) => {