Add unary not (#5111)

This commit is contained in:
JT
2022-04-07 07:10:25 +12:00
committed by GitHub
parent 12d3e4e424
commit 591fb4bd36
8 changed files with 115 additions and 1 deletions

View File

@ -111,6 +111,7 @@ impl Command for Glob {
}
};
#[allow(clippy::needless_collect)]
let glob_results: Vec<Value> = glob
.walk(path, folder_depth)
.flatten()

View File

@ -195,6 +195,12 @@ fn convert_to_value(
"binary operators not supported in nuon".into(),
expr.span,
)),
Expr::UnaryNot(..) => Err(ShellError::OutsideSpannedLabeledError(
original_text.to_string(),
"Error when loading".into(),
"unary operators not supported in nuon".into(),
expr.span,
)),
Expr::Block(..) => Err(ShellError::OutsideSpannedLabeledError(
original_text.to_string(),
"Error when loading".into(),