mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Add new TYPE_BOUND_LIST and TYPE_BOUND syntax kinds
These are now used when parsing type bounds. In addition parsing paths inside a bound now does not recursively parse paths, rather they are treated as separate bounds, separated by +.
This commit is contained in:
parent
9ebd14a14e
commit
23fdc562bf
5 changed files with 95 additions and 2 deletions
|
@ -243,6 +243,8 @@ Grammar(
|
|||
"PARAM",
|
||||
"SELF_PARAM",
|
||||
"ARG_LIST",
|
||||
"TYPE_BOUND",
|
||||
"TYPE_BOUND_LIST",
|
||||
],
|
||||
ast: {
|
||||
"SourceFile": (
|
||||
|
@ -577,6 +579,17 @@ Grammar(
|
|||
traits: ["AttrsOwner"],
|
||||
),
|
||||
"Lifetime": ( traits: ["AstToken"] ),
|
||||
"TypeBound": (
|
||||
options: [
|
||||
"TypeRef",
|
||||
"Lifetime",
|
||||
]
|
||||
),
|
||||
"TypeBoundList": (
|
||||
collections: [
|
||||
["bounds", "TypeBound"],
|
||||
]
|
||||
),
|
||||
"WhereClause": (),
|
||||
"ExprStmt": (
|
||||
options: [ ["expr", "Expr"] ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue