From 7581984601b35c113c4bcdf0f8b402b2635be0dc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Aug 2018 09:38:27 +0300 Subject: bump ron --- crates/libsyntax2/src/ast/generated.rs.tera | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crates/libsyntax2/src/ast/generated.rs.tera') 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 AstNode for {{ Name }} { } fn syntax(&self) -> &SyntaxNode { &self.syntax } } + +impl {{ Name }} { +{% for (method_name, kind) in node.opts %} +{% set ChildName = kind | camel %} + pub fn {{ method_name }}<'a>(&'a self) -> impl Iterator> + 'a { + self.syntax() + .children() + .filter_map({{ ChildKind }}::cast) + } +{% endfor %} +} {% endfor %} -- cgit v1.2.3