feat: parse super let

This commit is contained in:
Lukas Wirth 2025-04-21 13:47:42 +02:00
parent 66e3b5819e
commit 1b6948e88a
5 changed files with 30 additions and 4 deletions

View file

@ -348,7 +348,7 @@ Stmt =
| LetStmt
LetStmt =
Attr* 'let' Pat (':' Type)?
Attr* 'super'? 'let' Pat (':' Type)?
'=' initializer:Expr
LetElse?
';'

View file

@ -823,6 +823,8 @@ impl LetStmt {
pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
#[inline]
pub fn let_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![let]) }
#[inline]
pub fn super_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![super]) }
}
pub struct Lifetime {
pub(crate) syntax: SyntaxNode,