Struct erg_parser::ast::ConstArgs
source · pub struct ConstArgs { /* private fields */ }
Implementations§
source§impl ConstArgs
impl ConstArgs
pub fn new( pos_args: Vec<ConstPosArg>, var_args: Option<ConstPosArg>, kw_args: Vec<ConstKwArg>, paren: Option<(Token, Token)> ) -> Self
pub fn pos_only( pos_args: Vec<ConstPosArg>, paren: Option<(Token, Token)> ) -> Self
pub fn deconstruct( self ) -> (Vec<ConstPosArg>, Option<ConstPosArg>, Vec<ConstKwArg>, Option<(Token, Token)>)
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
pub fn pos_args(&self) -> impl Iterator<Item = &ConstPosArg>
pub fn kw_args(&self) -> impl Iterator<Item = &ConstKwArg>
pub fn into_iters( self ) -> (impl IntoIterator<Item = ConstPosArg>, impl IntoIterator<Item = ConstKwArg>)
pub fn push_pos(&mut self, arg: ConstPosArg)
pub fn push_kw(&mut self, arg: ConstKwArg)
pub fn downcast(self) -> Args
Trait Implementations§
source§impl Locational for ConstArgs
impl Locational for ConstArgs
source§fn loc(&self) -> Location
fn loc(&self) -> Location
NOTE:
loc
cannot be treated as a light method when self
is a large grammatical element.
If possible, delay the computation by passing &impl Locational
or other means.