Add path completions

This commit is contained in:
JT
2021-10-05 08:21:31 +13:00
parent 2b5cc63118
commit a88058006a
12 changed files with 182 additions and 11 deletions

View File

@ -15,6 +15,8 @@ pub enum FlatShape {
Operator,
Signature,
String,
Filepath,
GlobPattern,
Variable,
Custom(String),
}
@ -118,7 +120,12 @@ pub fn flatten_expression(
Expr::Bool(_) => {
vec![(expr.span, FlatShape::Bool)]
}
Expr::Filepath(_) => {
vec![(expr.span, FlatShape::Filepath)]
}
Expr::GlobPattern(_) => {
vec![(expr.span, FlatShape::GlobPattern)]
}
Expr::List(list) => {
let mut output = vec![];
for l in list {