aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/ast.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 211ba31e5..000cfb981 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -296,6 +296,15 @@ impl IfExpr {
296 } 296 }
297} 297}
298 298
299impl ExprStmt {
300 pub fn has_semi(&self) -> bool {
301 match self.syntax().last_child() {
302 None => false,
303 Some(node) => node.kind() == SEMI,
304 }
305 }
306}
307
299#[derive(Debug, Clone, Copy, PartialEq, Eq)] 308#[derive(Debug, Clone, Copy, PartialEq, Eq)]
300pub enum PathSegmentKind<'a> { 309pub enum PathSegmentKind<'a> {
301 Name(&'a NameRef), 310 Name(&'a NameRef),