mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 18:34:31 +02:00
nothing variable (#527)
* nothing variable * corrected comments * added color to nothing like bool * compare nothing with values * comparison tests
This commit is contained in:
@ -33,5 +33,6 @@ pub enum Expr {
|
||||
FullCellPath(Box<FullCellPath>),
|
||||
ImportPattern(ImportPattern),
|
||||
Signature(Box<Signature>),
|
||||
Nothing,
|
||||
Garbage,
|
||||
}
|
||||
|
@ -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),
|
||||
|
Reference in New Issue
Block a user