mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Complete types
This commit is contained in:
parent
9fcebbc512
commit
49e14a99ed
3 changed files with 35 additions and 8 deletions
|
@ -1278,6 +1278,24 @@ impl<'a> AstNode<'a> for Pat<'a> {
|
|||
|
||||
impl<'a> Pat<'a> {}
|
||||
|
||||
// Path
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct Path<'a> {
|
||||
syntax: SyntaxNodeRef<'a>,
|
||||
}
|
||||
|
||||
impl<'a> AstNode<'a> for Path<'a> {
|
||||
fn cast(syntax: SyntaxNodeRef<'a>) -> Option<Self> {
|
||||
match syntax.kind() {
|
||||
PATH => Some(Path { syntax }),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
fn syntax(self) -> SyntaxNodeRef<'a> { self.syntax }
|
||||
}
|
||||
|
||||
impl<'a> Path<'a> {}
|
||||
|
||||
// PathExpr
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct PathExpr<'a> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue