Improve pattern matching MIR lowering

This commit is contained in:
hkalbasi 2023-03-14 23:01:46 +03:30
parent 051dae2221
commit 9564773d5e
9 changed files with 590 additions and 395 deletions

View file

@ -1376,6 +1376,7 @@ pub struct LiteralPat {
}
impl LiteralPat {
pub fn literal(&self) -> Option<Literal> { support::child(&self.syntax) }
pub fn minus_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![-]) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]