nothing variable (#527)

* nothing variable

* corrected comments

* added color to nothing like bool

* compare nothing with values

* comparison tests
This commit is contained in:
Fernando Herrera
2021-12-20 01:05:33 +00:00
committed by GitHub
parent ff5b7e5ad2
commit e949658381
11 changed files with 167 additions and 152 deletions

View File

@ -1186,6 +1186,16 @@ pub fn parse_variable_expr(
},
None,
);
} else if contents == b"$nothing" {
return (
Expression {
expr: Expr::Nothing,
span,
ty: Type::Nothing,
custom_completion: None,
},
None,
);
} else if contents == b"$nu" {
return (
Expression {
@ -3483,6 +3493,7 @@ pub fn find_captures_in_expr(
}
Expr::ImportPattern(_) => {}
Expr::Garbage => {}
Expr::Nothing => {}
Expr::GlobPattern(_) => {}
Expr::Int(_) => {}
Expr::Keyword(_, _, expr) => {