add has_semi to ExprStmt

This commit is contained in:
Yerkebulan Tulibergenov 2019-01-15 20:26:46 -08:00
parent 4149285bf5
commit 5e35f191fc

View File

@ -296,6 +296,15 @@ impl IfExpr {
}
}
impl ExprStmt {
pub fn has_semi(&self) -> bool {
match self.syntax().last_child() {
None => false,
Some(node) => node.kind() == SEMI,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PathSegmentKind<'a> {
Name(&'a NameRef),