From 081c16c77642a5c86ed72c5fbd11deccc2edd5d5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 17 Aug 2018 15:37:17 +0300 Subject: initial mod resolve --- crates/libsyntax2/src/ast/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crates/libsyntax2/src/ast/mod.rs') diff --git a/crates/libsyntax2/src/ast/mod.rs b/crates/libsyntax2/src/ast/mod.rs index d53b12ab8..9b9200f99 100644 --- a/crates/libsyntax2/src/ast/mod.rs +++ b/crates/libsyntax2/src/ast/mod.rs @@ -118,3 +118,12 @@ impl ImplItem { (first, second) } } + +impl Module { + pub fn has_semi(&self) -> bool { + match self.syntax_ref().last_child() { + None => false, + Some(node) => node.kind() == SEMI, + } + } +} -- cgit v1.2.3