aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/ast
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-17 13:37:17 +0100
committerAleksey Kladov <[email protected]>2018-08-17 13:37:17 +0100
commit081c16c77642a5c86ed72c5fbd11deccc2edd5d5 (patch)
tree90ddf4f92954fcb00f4c20a46968932c5f0bbdea /crates/libsyntax2/src/ast
parent55e87e0b742b46d40b1a5ef1598804e48e45f0e0 (diff)
initial mod resolve
Diffstat (limited to 'crates/libsyntax2/src/ast')
-rw-r--r--crates/libsyntax2/src/ast/mod.rs9
1 files changed, 9 insertions, 0 deletions
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 <R: TreeRoot> ImplItem<R> {
118 (first, second) 118 (first, second)
119 } 119 }
120} 120}
121
122impl <R: TreeRoot> Module<R> {
123 pub fn has_semi(&self) -> bool {
124 match self.syntax_ref().last_child() {
125 None => false,
126 Some(node) => node.kind() == SEMI,
127 }
128 }
129}