Struct pomelo_hir::hir::Pat
source · Expand description
HIR pattern node.
Fields§
§kind: PatKind
§ast_id: AstId<Pat>
Implementations§
source§impl Pat
impl Pat
pub fn kind(&self) -> &PatKind
pub fn missing(&self) -> bool
pub fn wildcard(&self) -> bool
pub fn scon(&self) -> Option<&Scon>
pub fn vid(&self) -> Option<(bool, &(LongVId, Option<DefLoc>))>
pub fn record(&self) -> Option<&[PatRow]>
pub fn cons(&self) -> Option<(bool, &(LongVId, DefLoc), Idx<Pat>)>
pub fn infix(&self) -> Option<(Idx<Pat>, &(VId, DefLoc), Idx<Pat>)>
pub fn typed(&self) -> Option<(Idx<Pat>, Idx<Ty>)>
pub fn layered(&self) -> Option<(bool, &VId, Option<Idx<Ty>>, Idx<Pat>)>
source§impl Pat
impl Pat
pub fn vid_builtin(b: Builtin) -> PatKind
sourcepub fn make_tuple(pats: impl Iterator<Item = Idx<Pat>>) -> PatKind
pub fn make_tuple(pats: impl Iterator<Item = Idx<Pat>>) -> PatKind
Other lowering stages need to make tuple pats