mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Align grammar for record patterns and literals
The grammar now looks like this [name_ref :] pat
This commit is contained in:
parent
6b49e774e2
commit
5e5eb6a108
18 changed files with 145 additions and 90 deletions
|
@ -1806,8 +1806,8 @@ impl AstNode for RecordFieldPat {
|
|||
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
||||
}
|
||||
impl ast::AttrsOwner for RecordFieldPat {}
|
||||
impl ast::NameOwner for RecordFieldPat {}
|
||||
impl RecordFieldPat {
|
||||
pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
|
||||
pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
|
||||
pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue