diff options
author | Aleksey Kladov <[email protected]> | 2018-08-31 14:30:42 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-31 14:30:42 +0100 |
commit | 7a5bc94774a50837f8c9bf8b96c8272882aca640 (patch) | |
tree | 7d96566cbbf7bdd636fd095acb6bff12bba1ec13 /crates/libsyntax2/src/ast | |
parent | cdb9b4cbf417976739de5147938e2c3080e497b9 (diff) |
complete self
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs | 21 |
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 | } |
1171 | pub 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)] | ||
1587 | pub struct SelfParam<'a> { | ||
1588 | syntax: SyntaxNodeRef<'a>, | ||
1589 | } | ||
1590 | |||
1591 | impl<'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 | |||
1601 | impl<'a> SelfParam<'a> {} | ||
1602 | |||
1582 | // SlicePat | 1603 | // SlicePat |
1583 | #[derive(Debug, Clone, Copy)] | 1604 | #[derive(Debug, Clone, Copy)] |
1584 | pub struct SlicePat<'a> { | 1605 | pub struct SlicePat<'a> { |