Struct erg_compiler::hir::Args
source · pub struct Args {
pub pos_args: Vec<PosArg>,
pub var_args: Option<Box<PosArg>>,
pub kw_args: Vec<KwArg>,
/* private fields */
}
Fields§
§pos_args: Vec<PosArg>
§var_args: Option<Box<PosArg>>
§kw_args: Vec<KwArg>
Implementations§
source§impl Args
impl Args
pub fn new(
pos_args: Vec<PosArg>,
var_args: Option<PosArg>,
kw_args: Vec<KwArg>,
paren: Option<(Token, Token)>
) -> Self
pub fn values(exprs: Vec<Expr>, paren: Option<(Token, Token)>) -> Self
pub fn empty() -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn kw_len(&self) -> usize
pub fn push_pos(&mut self, pos: PosArg)
pub fn push_kw(&mut self, kw: KwArg)
pub fn remove(&mut self, index: usize) -> Expr
sourcepub fn try_remove(&mut self, index: usize) -> Option<Expr>
pub fn try_remove(&mut self, index: usize) -> Option<Expr>
try_remove((1, 2, z: 3), 2) == Some(3)