diff options
author | Aleksey Kladov <[email protected]> | 2018-08-11 07:38:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-11 07:38:27 +0100 |
commit | 7581984601b35c113c4bcdf0f8b402b2635be0dc (patch) | |
tree | 08d21e6af90e57fd739c4f24dc221e0466375a1d /crates/libsyntax2/src/ast | |
parent | 35b59bb43877c496fbaf98520b3b52ff9a6518b1 (diff) |
bump ron
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r-- | crates/libsyntax2/src/ast/generated.rs.tera | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/ast/generated.rs.tera b/crates/libsyntax2/src/ast/generated.rs.tera index 242837801..afce068c8 100644 --- a/crates/libsyntax2/src/ast/generated.rs.tera +++ b/crates/libsyntax2/src/ast/generated.rs.tera | |||
@@ -19,4 +19,15 @@ impl<R: TreeRoot> AstNode<R> for {{ Name }}<R> { | |||
19 | } | 19 | } |
20 | fn syntax(&self) -> &SyntaxNode<R> { &self.syntax } | 20 | fn syntax(&self) -> &SyntaxNode<R> { &self.syntax } |
21 | } | 21 | } |
22 | |||
23 | impl<R: TreeRoot> {{ Name }}<R> { | ||
24 | {% for (method_name, kind) in node.opts %} | ||
25 | {% set ChildName = kind | camel %} | ||
26 | pub fn {{ method_name }}<'a>(&'a self) -> impl Iterator<Item = {{ ChildKind }}<R>> + 'a { | ||
27 | self.syntax() | ||
28 | .children() | ||
29 | .filter_map({{ ChildKind }}::cast) | ||
30 | } | ||
31 | {% endfor %} | ||
32 | } | ||
22 | {% endfor %} | 33 | {% endfor %} |