From afa94d4f37b9a0a1e723edffcc79c3d48799bad1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 9 Aug 2018 17:44:40 +0300 Subject: fn_item -> function --- src/ast/generated.rs | 6 +++--- src/ast/mod.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ast') diff --git a/src/ast/generated.rs b/src/ast/generated.rs index 612b04f86..b93c76d0c 100644 --- a/src/ast/generated.rs +++ b/src/ast/generated.rs @@ -22,14 +22,14 @@ impl AstNode for File { #[derive(Debug)] -pub struct FnItem> { +pub struct Function> { syntax: SyntaxNode, } -impl AstNode for FnItem { +impl AstNode for Function { fn cast(syntax: SyntaxNode) -> Option { match syntax.kind() { - FN_ITEM => Some(FnItem { syntax }), + FUNCTION => Some(Function { syntax }), _ => None, } } diff --git a/src/ast/mod.rs b/src/ast/mod.rs index dc7e006c9..317ed4f45 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -19,14 +19,14 @@ impl File> { } impl File { - pub fn functions<'a>(&'a self) -> impl Iterator> + 'a { + pub fn functions<'a>(&'a self) -> impl Iterator> + 'a { self.syntax() .children() - .filter_map(FnItem::cast) + .filter_map(Function::cast) } } -impl FnItem { +impl Function { pub fn name(&self) -> Option> { self.syntax() .children() -- cgit v1.2.3