mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Port skip
, skip while
and skip until
commands (#380)
* Add `Skip` command * Add `SkipUntil` sub-command * Add `SkipWhile` sub-command * Add and use `Expression::as_row_condition_block`
This commit is contained in:
@ -53,6 +53,13 @@ impl Expression {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_row_condition_block(&self) -> Option<BlockId> {
|
||||
match self.expr {
|
||||
Expr::RowCondition(block_id) => Some(block_id),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn as_signature(&self) -> Option<Box<Signature>> {
|
||||
match &self.expr {
|
||||
Expr::Signature(sig) => Some(sig.clone()),
|
||||
|
Reference in New Issue
Block a user