mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 07:28:27 +02:00
Remove some macros (#12742)
# Description Replaces some macros with regular functions or other code.
This commit is contained in:
@ -36,6 +36,15 @@ impl Argument {
|
||||
Argument::Spread(e) => e.span,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn expr(&self) -> Option<&Expression> {
|
||||
match self {
|
||||
Argument::Named((_, _, expr)) => expr.as_ref(),
|
||||
Argument::Positional(expr) | Argument::Unknown(expr) | Argument::Spread(expr) => {
|
||||
Some(expr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
|
Reference in New Issue
Block a user