mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
add has_semi to ExprStmt
This commit is contained in:
parent
4149285bf5
commit
5e35f191fc
1 changed files with 9 additions and 0 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue