aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r--crates/libsyntax2/src/ast/generated.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs b/crates/libsyntax2/src/ast/generated.rs
index 58dcf574e..50dc41b27 100644
--- a/crates/libsyntax2/src/ast/generated.rs
+++ b/crates/libsyntax2/src/ast/generated.rs
@@ -1168,6 +1168,9 @@ impl<'a> ParamList<'a> {
1168 pub fn params(self) -> impl Iterator<Item = Param<'a>> + 'a { 1168 pub fn params(self) -> impl Iterator<Item = Param<'a>> + 'a {
1169 super::children(self) 1169 super::children(self)
1170 } 1170 }
1171pub fn self_param(self) -> Option<SelfParam<'a>> {
1172 super::child_opt(self)
1173 }
1171} 1174}
1172 1175
1173// ParenExpr 1176// ParenExpr
@@ -1579,6 +1582,24 @@ impl<'a> Root<'a> {
1579 } 1582 }
1580} 1583}
1581 1584
1585// SelfParam
1586#[derive(Debug, Clone, Copy)]
1587pub struct SelfParam<'a> {
1588 syntax: SyntaxNodeRef<'a>,
1589}
1590
1591impl<'a> AstNode<'a> for SelfParam<'a> {
1592 fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> {
1593 match syntax.kind() {
1594 SELF_PARAM => Some(SelfParam { syntax }),
1595 _ => None,
1596 }
1597 }
1598 fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax }
1599}
1600
1601impl<'a> SelfParam<'a> {}
1602
1582// SlicePat 1603// SlicePat
1583#[derive(Debug, Clone, Copy)] 1604#[derive(Debug, Clone, Copy)]
1584pub struct SlicePat<'a> { 1605pub struct SlicePat<'a> {