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

@ -33,5 +33,6 @@ pub enum Expr {
FullCellPath(Box<FullCellPath>),
ImportPattern(ImportPattern),
Signature(Box<Signature>),
Nothing,
Garbage,
}

View File

@ -148,6 +148,7 @@ impl Expression {
false
}
Expr::Garbage => false,
Expr::Nothing => false,
Expr::GlobPattern(_) => false,
Expr::Int(_) => false,
Expr::Keyword(_, _, expr) => expr.has_in_variable(working_set),
@ -291,6 +292,7 @@ impl Expression {
}
Expr::ImportPattern(_) => {}
Expr::Garbage => {}
Expr::Nothing => {}
Expr::GlobPattern(_) => {}
Expr::Int(_) => {}
Expr::Keyword(_, _, expr) => expr.replace_in_variable(working_set, new_var_id),