diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_syntax/src/ast.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 8bf439b60..e6b5e407d 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 | ||
299 | impl 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)] |
300 | pub enum PathSegmentKind<'a> { | 309 | pub enum PathSegmentKind<'a> { |
301 | Name(&'a NameRef), | 310 | Name(&'a NameRef), |