diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-31 10:11:48 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-31 10:11:48 +0100 |
commit | c5ca49678f129045e59438df279829902034ec71 (patch) | |
tree | 3fd54185e0c064fbd6f718ac345064ce9c559efb /crates | |
parent | 23dd53eb35ff50508d0c0fc5878a55754b12d381 (diff) | |
parent | 55dcdb7d094f473c73f87ecf997b24f8e35f2a5e (diff) |
Merge #1077
1077: Improve parsing of type bounds r=matklad a=vipentti
This adds 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 +.
Basically now the generic params `struct S<T: 'a + ?Sized + (Copy)>;` in will be parsed as
```
TYPE_PARAM_LIST@[8; 33)
L_ANGLE@[8; 9)
TYPE_PARAM@[9; 32)
NAME@[9; 10)
IDENT@[9; 10) "T"
COLON@[10; 11)
WHITESPACE@[11; 12)
TYPE_BOUND_LIST@[12; 32)
TYPE_BOUND@[12; 14)
LIFETIME@[12; 14) "'a"
WHITESPACE@[14; 15)
PLUS@[15; 16)
WHITESPACE@[16; 17)
TYPE_BOUND@[17; 23)
QUESTION@[17; 18)
PATH_TYPE@[18; 23)
PATH@[18; 23)
PATH_SEGMENT@[18; 23)
NAME_REF@[18; 23)
IDENT@[18; 23) "Sized"
WHITESPACE@[23; 24)
PLUS@[24; 25)
WHITESPACE@[25; 26)
TYPE_BOUND@[26; 32)
L_PAREN@[26; 27)
PATH_TYPE@[27; 31)
PATH@[27; 31)
PATH_SEGMENT@[27; 31)
NAME_REF@[27; 31)
IDENT@[27; 31) "Copy"
R_PAREN@[31; 32)
R_ANGLE@[32; 33)
```
Previously it was parsed, with the paths nested:
```
TYPE_PARAM_LIST@[8; 33)
L_ANGLE@[8; 9)
TYPE_PARAM@[9; 32)
NAME@[9; 10)
IDENT@[9; 10) "T"
COLON@[10; 11)
WHITESPACE@[11; 12)
LIFETIME@[12; 14) "'a"
WHITESPACE@[14; 15)
PLUS@[15; 16)
WHITESPACE@[16; 17)
QUESTION@[17; 18)
PATH_TYPE@[18; 32)
PATH@[18; 23)
PATH_SEGMENT@[18; 23)
NAME_REF@[18; 23)
IDENT@[18; 23) "Sized"
WHITESPACE@[23; 24)
PLUS@[24; 25)
WHITESPACE@[25; 26)
L_PAREN@[26; 27)
PATH_TYPE@[27; 31)
PATH@[27; 31)
PATH_SEGMENT@[27; 31)
NAME_REF@[27; 31)
IDENT@[27; 31) "Copy"
R_PAREN@[31; 32)
R_ANGLE@[32; 33)
```
Looking for feedback.
Co-authored-by: Ville Penttinen <[email protected]>
Diffstat (limited to 'crates')
33 files changed, 916 insertions, 507 deletions
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index f49615f6b..d03a6be0d 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs | |||
@@ -2,6 +2,7 @@ use super::*; | |||
2 | 2 | ||
3 | // test trait_item | 3 | // test trait_item |
4 | // trait T<U>: Hash + Clone where U: Copy {} | 4 | // trait T<U>: Hash + Clone where U: Copy {} |
5 | // trait X<U: Debug + Display>: Hash + Clone where U: Copy {} | ||
5 | pub(super) fn trait_def(p: &mut Parser) { | 6 | pub(super) fn trait_def(p: &mut Parser) { |
6 | assert!(p.at(TRAIT_KW)); | 7 | assert!(p.at(TRAIT_KW)); |
7 | p.bump(); | 8 | p.bump(); |
diff --git a/crates/ra_parser/src/grammar/type_params.rs b/crates/ra_parser/src/grammar/type_params.rs index 40f998682..42763fc87 100644 --- a/crates/ra_parser/src/grammar/type_params.rs +++ b/crates/ra_parser/src/grammar/type_params.rs | |||
@@ -79,23 +79,40 @@ fn lifetime_bounds(p: &mut Parser) { | |||
79 | } | 79 | } |
80 | } | 80 | } |
81 | 81 | ||
82 | pub(super) fn bounds_without_colon(p: &mut Parser) { | 82 | pub(super) fn bounds_without_colon_m(p: &mut Parser, marker: Marker) -> CompletedMarker { |
83 | loop { | 83 | while type_bound(p) { |
84 | let has_paren = p.eat(L_PAREN); | ||
85 | p.eat(QUESTION); | ||
86 | match p.current() { | ||
87 | LIFETIME => p.bump(), | ||
88 | FOR_KW => types::for_type(p), | ||
89 | _ if paths::is_path_start(p) => types::path_type(p), | ||
90 | _ => break, | ||
91 | } | ||
92 | if has_paren { | ||
93 | p.expect(R_PAREN); | ||
94 | } | ||
95 | if !p.eat(PLUS) { | 84 | if !p.eat(PLUS) { |
96 | break; | 85 | break; |
97 | } | 86 | } |
98 | } | 87 | } |
88 | |||
89 | marker.complete(p, TYPE_BOUND_LIST) | ||
90 | } | ||
91 | |||
92 | pub(super) fn bounds_without_colon(p: &mut Parser) { | ||
93 | let m = p.start(); | ||
94 | bounds_without_colon_m(p, m); | ||
95 | } | ||
96 | |||
97 | fn type_bound(p: &mut Parser) -> bool { | ||
98 | let m = p.start(); | ||
99 | let has_paren = p.eat(L_PAREN); | ||
100 | p.eat(QUESTION); | ||
101 | match p.current() { | ||
102 | LIFETIME => p.bump(), | ||
103 | FOR_KW => types::for_type(p), | ||
104 | _ if paths::is_path_start(p) => types::path_type_(p, false), | ||
105 | _ => { | ||
106 | m.abandon(p); | ||
107 | return false; | ||
108 | } | ||
109 | } | ||
110 | if has_paren { | ||
111 | p.expect(R_PAREN); | ||
112 | } | ||
113 | m.complete(p, TYPE_BOUND); | ||
114 | |||
115 | true | ||
99 | } | 116 | } |
100 | 117 | ||
101 | // test where_clause | 118 | // test where_clause |
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index fdd4f2c52..a46da9b44 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -261,21 +261,47 @@ fn path_or_macro_type_(p: &mut Parser, allow_bounds: bool) { | |||
261 | PATH_TYPE | 261 | PATH_TYPE |
262 | }; | 262 | }; |
263 | 263 | ||
264 | if allow_bounds && p.eat(PLUS) { | 264 | let path = m.complete(p, kind); |
265 | type_params::bounds_without_colon(p); | ||
266 | } | ||
267 | 265 | ||
268 | m.complete(p, kind); | 266 | if allow_bounds { |
267 | opt_path_type_bounds_as_dyn_trait_type(p, path); | ||
268 | } | ||
269 | } | 269 | } |
270 | 270 | ||
271 | pub(super) fn path_type_(p: &mut Parser, allow_bounds: bool) { | 271 | pub(super) fn path_type_(p: &mut Parser, allow_bounds: bool) { |
272 | assert!(paths::is_path_start(p) || p.at(L_ANGLE)); | 272 | assert!(paths::is_path_start(p) || p.at(L_ANGLE)); |
273 | let m = p.start(); | 273 | let m = p.start(); |
274 | paths::type_path(p); | 274 | paths::type_path(p); |
275 | |||
275 | // test path_type_with_bounds | 276 | // test path_type_with_bounds |
276 | // fn foo() -> Box<T + 'f> {} | 277 | // fn foo() -> Box<T + 'f> {} |
277 | if allow_bounds && p.eat(PLUS) { | 278 | // fn foo() -> Box<dyn T + 'f> {} |
278 | type_params::bounds_without_colon(p); | 279 | let path = m.complete(p, PATH_TYPE); |
280 | if allow_bounds { | ||
281 | opt_path_type_bounds_as_dyn_trait_type(p, path); | ||
279 | } | 282 | } |
280 | m.complete(p, PATH_TYPE); | 283 | } |
284 | |||
285 | /// This turns a parsed PATH_TYPE optionally into a DYN_TRAIT_TYPE | ||
286 | /// with a TYPE_BOUND_LIST | ||
287 | fn opt_path_type_bounds_as_dyn_trait_type(p: &mut Parser, path_type_marker: CompletedMarker) { | ||
288 | if !p.at(PLUS) { | ||
289 | return; | ||
290 | } | ||
291 | |||
292 | // First create a TYPE_BOUND from the completed PATH_TYPE | ||
293 | let m = path_type_marker.precede(p).complete(p, TYPE_BOUND); | ||
294 | |||
295 | // Next setup a marker for the TYPE_BOUND_LIST | ||
296 | let m = m.precede(p); | ||
297 | |||
298 | // This gets consumed here so it gets properly set | ||
299 | // in the TYPE_BOUND_LIST | ||
300 | p.eat(PLUS); | ||
301 | |||
302 | // Parse rest of the bounds into the TYPE_BOUND_LIST | ||
303 | let m = type_params::bounds_without_colon_m(p, m); | ||
304 | |||
305 | // Finally precede everything with DYN_TRAIT_TYPE | ||
306 | m.precede(p).complete(p, DYN_TRAIT_TYPE); | ||
281 | } | 307 | } |
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 03247ae38..547af1b27 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -228,6 +228,8 @@ pub enum SyntaxKind { | |||
228 | PARAM, | 228 | PARAM, |
229 | SELF_PARAM, | 229 | SELF_PARAM, |
230 | ARG_LIST, | 230 | ARG_LIST, |
231 | TYPE_BOUND, | ||
232 | TYPE_BOUND_LIST, | ||
231 | } | 233 | } |
232 | use self::SyntaxKind::*; | 234 | use self::SyntaxKind::*; |
233 | 235 | ||
@@ -567,6 +569,8 @@ impl SyntaxKind { | |||
567 | PARAM => &SyntaxInfo { name: "PARAM" }, | 569 | PARAM => &SyntaxInfo { name: "PARAM" }, |
568 | SELF_PARAM => &SyntaxInfo { name: "SELF_PARAM" }, | 570 | SELF_PARAM => &SyntaxInfo { name: "SELF_PARAM" }, |
569 | ARG_LIST => &SyntaxInfo { name: "ARG_LIST" }, | 571 | ARG_LIST => &SyntaxInfo { name: "ARG_LIST" }, |
572 | TYPE_BOUND => &SyntaxInfo { name: "TYPE_BOUND" }, | ||
573 | TYPE_BOUND_LIST => &SyntaxInfo { name: "TYPE_BOUND_LIST" }, | ||
570 | TOMBSTONE => &SyntaxInfo { name: "TOMBSTONE" }, | 574 | TOMBSTONE => &SyntaxInfo { name: "TOMBSTONE" }, |
571 | EOF => &SyntaxInfo { name: "EOF" }, | 575 | EOF => &SyntaxInfo { name: "EOF" }, |
572 | } | 576 | } |
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index a6fac07c4..4fddc00ea 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -110,6 +110,12 @@ pub trait TypeParamsOwner: AstNode { | |||
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
113 | pub trait TypeBoundsOwner: AstNode { | ||
114 | fn type_bound_list(&self) -> Option<&TypeBoundList> { | ||
115 | child_opt(self) | ||
116 | } | ||
117 | } | ||
118 | |||
113 | pub trait AttrsOwner: AstNode { | 119 | pub trait AttrsOwner: AstNode { |
114 | fn attrs(&self) -> AstChildren<Attr> { | 120 | fn attrs(&self) -> AstChildren<Attr> { |
115 | children(self) | 121 | children(self) |
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 47a37e4d1..9ea423b40 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -685,6 +685,7 @@ impl ToOwned for DynTraitType { | |||
685 | } | 685 | } |
686 | 686 | ||
687 | 687 | ||
688 | impl ast::TypeBoundsOwner for DynTraitType {} | ||
688 | impl DynTraitType {} | 689 | impl DynTraitType {} |
689 | 690 | ||
690 | // EnumDef | 691 | // EnumDef |
@@ -1581,6 +1582,7 @@ impl ToOwned for ImplTraitType { | |||
1581 | } | 1582 | } |
1582 | 1583 | ||
1583 | 1584 | ||
1585 | impl ast::TypeBoundsOwner for ImplTraitType {} | ||
1584 | impl ImplTraitType {} | 1586 | impl ImplTraitType {} |
1585 | 1587 | ||
1586 | // IndexExpr | 1588 | // IndexExpr |
@@ -4061,6 +4063,7 @@ impl ast::NameOwner for TraitDef {} | |||
4061 | impl ast::AttrsOwner for TraitDef {} | 4063 | impl ast::AttrsOwner for TraitDef {} |
4062 | impl ast::DocCommentsOwner for TraitDef {} | 4064 | impl ast::DocCommentsOwner for TraitDef {} |
4063 | impl ast::TypeParamsOwner for TraitDef {} | 4065 | impl ast::TypeParamsOwner for TraitDef {} |
4066 | impl ast::TypeBoundsOwner for TraitDef {} | ||
4064 | impl TraitDef { | 4067 | impl TraitDef { |
4065 | pub fn item_list(&self) -> Option<&ItemList> { | 4068 | pub fn item_list(&self) -> Option<&ItemList> { |
4066 | super::child_opt(self) | 4069 | super::child_opt(self) |
@@ -4291,6 +4294,7 @@ impl ast::NameOwner for TypeAliasDef {} | |||
4291 | impl ast::TypeParamsOwner for TypeAliasDef {} | 4294 | impl ast::TypeParamsOwner for TypeAliasDef {} |
4292 | impl ast::AttrsOwner for TypeAliasDef {} | 4295 | impl ast::AttrsOwner for TypeAliasDef {} |
4293 | impl ast::DocCommentsOwner for TypeAliasDef {} | 4296 | impl ast::DocCommentsOwner for TypeAliasDef {} |
4297 | impl ast::TypeBoundsOwner for TypeAliasDef {} | ||
4294 | impl TypeAliasDef { | 4298 | impl TypeAliasDef { |
4295 | pub fn type_ref(&self) -> Option<&TypeRef> { | 4299 | pub fn type_ref(&self) -> Option<&TypeRef> { |
4296 | super::child_opt(self) | 4300 | super::child_opt(self) |
@@ -4369,6 +4373,74 @@ impl TypeArgList { | |||
4369 | } | 4373 | } |
4370 | } | 4374 | } |
4371 | 4375 | ||
4376 | // TypeBound | ||
4377 | #[derive(Debug, PartialEq, Eq, Hash)] | ||
4378 | #[repr(transparent)] | ||
4379 | pub struct TypeBound { | ||
4380 | pub(crate) syntax: SyntaxNode, | ||
4381 | } | ||
4382 | unsafe impl TransparentNewType for TypeBound { | ||
4383 | type Repr = rowan::SyntaxNode<RaTypes>; | ||
4384 | } | ||
4385 | |||
4386 | impl AstNode for TypeBound { | ||
4387 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | ||
4388 | match syntax.kind() { | ||
4389 | TYPE_BOUND => Some(TypeBound::from_repr(syntax.into_repr())), | ||
4390 | _ => None, | ||
4391 | } | ||
4392 | } | ||
4393 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
4394 | } | ||
4395 | |||
4396 | impl ToOwned for TypeBound { | ||
4397 | type Owned = TreeArc<TypeBound>; | ||
4398 | fn to_owned(&self) -> TreeArc<TypeBound> { TreeArc::cast(self.syntax.to_owned()) } | ||
4399 | } | ||
4400 | |||
4401 | |||
4402 | impl TypeBound { | ||
4403 | pub fn type_ref(&self) -> Option<&TypeRef> { | ||
4404 | super::child_opt(self) | ||
4405 | } | ||
4406 | |||
4407 | pub fn lifetime(&self) -> Option<&Lifetime> { | ||
4408 | super::child_opt(self) | ||
4409 | } | ||
4410 | } | ||
4411 | |||
4412 | // TypeBoundList | ||
4413 | #[derive(Debug, PartialEq, Eq, Hash)] | ||
4414 | #[repr(transparent)] | ||
4415 | pub struct TypeBoundList { | ||
4416 | pub(crate) syntax: SyntaxNode, | ||
4417 | } | ||
4418 | unsafe impl TransparentNewType for TypeBoundList { | ||
4419 | type Repr = rowan::SyntaxNode<RaTypes>; | ||
4420 | } | ||
4421 | |||
4422 | impl AstNode for TypeBoundList { | ||
4423 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | ||
4424 | match syntax.kind() { | ||
4425 | TYPE_BOUND_LIST => Some(TypeBoundList::from_repr(syntax.into_repr())), | ||
4426 | _ => None, | ||
4427 | } | ||
4428 | } | ||
4429 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
4430 | } | ||
4431 | |||
4432 | impl ToOwned for TypeBoundList { | ||
4433 | type Owned = TreeArc<TypeBoundList>; | ||
4434 | fn to_owned(&self) -> TreeArc<TypeBoundList> { TreeArc::cast(self.syntax.to_owned()) } | ||
4435 | } | ||
4436 | |||
4437 | |||
4438 | impl TypeBoundList { | ||
4439 | pub fn bounds(&self) -> impl Iterator<Item = &TypeBound> { | ||
4440 | super::children(self) | ||
4441 | } | ||
4442 | } | ||
4443 | |||
4372 | // TypeParam | 4444 | // TypeParam |
4373 | #[derive(Debug, PartialEq, Eq, Hash)] | 4445 | #[derive(Debug, PartialEq, Eq, Hash)] |
4374 | #[repr(transparent)] | 4446 | #[repr(transparent)] |
@@ -4397,6 +4469,7 @@ impl ToOwned for TypeParam { | |||
4397 | 4469 | ||
4398 | impl ast::NameOwner for TypeParam {} | 4470 | impl ast::NameOwner for TypeParam {} |
4399 | impl ast::AttrsOwner for TypeParam {} | 4471 | impl ast::AttrsOwner for TypeParam {} |
4472 | impl ast::TypeBoundsOwner for TypeParam {} | ||
4400 | impl TypeParam {} | 4473 | impl TypeParam {} |
4401 | 4474 | ||
4402 | // TypeParamList | 4475 | // TypeParamList |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index ad6d74162..18730a894 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -243,6 +243,8 @@ Grammar( | |||
243 | "PARAM", | 243 | "PARAM", |
244 | "SELF_PARAM", | 244 | "SELF_PARAM", |
245 | "ARG_LIST", | 245 | "ARG_LIST", |
246 | "TYPE_BOUND", | ||
247 | "TYPE_BOUND_LIST", | ||
246 | ], | 248 | ], |
247 | ast: { | 249 | ast: { |
248 | "SourceFile": ( | 250 | "SourceFile": ( |
@@ -293,7 +295,7 @@ Grammar( | |||
293 | "EnumVariantList": ( collections: [["variants", "EnumVariant"]] ), | 295 | "EnumVariantList": ( collections: [["variants", "EnumVariant"]] ), |
294 | "EnumVariant": ( traits: ["NameOwner", "DocCommentsOwner", "AttrsOwner"], options: ["Expr"] ), | 296 | "EnumVariant": ( traits: ["NameOwner", "DocCommentsOwner", "AttrsOwner"], options: ["Expr"] ), |
295 | "TraitDef": ( | 297 | "TraitDef": ( |
296 | traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner"], | 298 | traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner", "TypeParamsOwner", "TypeBoundsOwner"], |
297 | options: ["ItemList"] | 299 | options: ["ItemList"] |
298 | ), | 300 | ), |
299 | "Module": ( | 301 | "Module": ( |
@@ -330,7 +332,8 @@ Grammar( | |||
330 | "NameOwner", | 332 | "NameOwner", |
331 | "TypeParamsOwner", | 333 | "TypeParamsOwner", |
332 | "AttrsOwner", | 334 | "AttrsOwner", |
333 | "DocCommentsOwner" | 335 | "DocCommentsOwner", |
336 | "TypeBoundsOwner", | ||
334 | ], | 337 | ], |
335 | options: ["TypeRef"] | 338 | options: ["TypeRef"] |
336 | ), | 339 | ), |
@@ -347,8 +350,12 @@ Grammar( | |||
347 | "PlaceholderType": (), | 350 | "PlaceholderType": (), |
348 | "FnPointerType": (options: ["ParamList", "RetType"]), | 351 | "FnPointerType": (options: ["ParamList", "RetType"]), |
349 | "ForType": (options: ["TypeRef"]), | 352 | "ForType": (options: ["TypeRef"]), |
350 | "ImplTraitType": (), | 353 | "ImplTraitType": ( |
351 | "DynTraitType": (), | 354 | traits: ["TypeBoundsOwner"], |
355 | ), | ||
356 | "DynTraitType": ( | ||
357 | traits: ["TypeBoundsOwner"], | ||
358 | ), | ||
352 | 359 | ||
353 | "TypeRef": ( enum: [ | 360 | "TypeRef": ( enum: [ |
354 | "ParenType", | 361 | "ParenType", |
@@ -571,12 +578,23 @@ Grammar( | |||
571 | ["lifetime_params", "LifetimeParam" ], | 578 | ["lifetime_params", "LifetimeParam" ], |
572 | ] | 579 | ] |
573 | ), | 580 | ), |
574 | "TypeParam": ( traits: ["NameOwner", "AttrsOwner"] ), | 581 | "TypeParam": ( traits: ["NameOwner", "AttrsOwner", "TypeBoundsOwner"] ), |
575 | "LifetimeParam": ( | 582 | "LifetimeParam": ( |
576 | options: [ "Lifetime"], | 583 | options: [ "Lifetime"], |
577 | traits: ["AttrsOwner"], | 584 | traits: ["AttrsOwner"], |
578 | ), | 585 | ), |
579 | "Lifetime": ( traits: ["AstToken"] ), | 586 | "Lifetime": ( traits: ["AstToken"] ), |
587 | "TypeBound": ( | ||
588 | options: [ | ||
589 | "TypeRef", | ||
590 | "Lifetime", | ||
591 | ] | ||
592 | ), | ||
593 | "TypeBoundList": ( | ||
594 | collections: [ | ||
595 | ["bounds", "TypeBound"], | ||
596 | ] | ||
597 | ), | ||
580 | "WhereClause": (), | 598 | "WhereClause": (), |
581 | "ExprStmt": ( | 599 | "ExprStmt": ( |
582 | options: [ ["expr", "Expr"] ] | 600 | options: [ ["expr", "Expr"] ] |
diff --git a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt b/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt index 8720fc6ea..45fa70593 100644 --- a/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt +++ b/crates/ra_syntax/tests/data/parser/err/0024_many_type_parens.txt | |||
@@ -11,47 +11,51 @@ SOURCE_FILE@[0; 240) | |||
11 | IDENT@[5; 6) "T" | 11 | IDENT@[5; 6) "T" |
12 | COLON@[6; 7) | 12 | COLON@[6; 7) |
13 | WHITESPACE@[7; 8) | 13 | WHITESPACE@[7; 8) |
14 | L_PAREN@[8; 9) | 14 | TYPE_BOUND_LIST@[8; 47) |
15 | PATH_TYPE@[9; 13) | 15 | TYPE_BOUND@[8; 14) |
16 | PATH@[9; 13) | 16 | L_PAREN@[8; 9) |
17 | PATH_SEGMENT@[9; 13) | 17 | PATH_TYPE@[9; 13) |
18 | NAME_REF@[9; 13) | 18 | PATH@[9; 13) |
19 | IDENT@[9; 13) "Copy" | 19 | PATH_SEGMENT@[9; 13) |
20 | R_PAREN@[13; 14) | 20 | NAME_REF@[9; 13) |
21 | WHITESPACE@[14; 15) | 21 | IDENT@[9; 13) "Copy" |
22 | PLUS@[15; 16) | 22 | R_PAREN@[13; 14) |
23 | WHITESPACE@[16; 17) | 23 | WHITESPACE@[14; 15) |
24 | L_PAREN@[17; 18) | 24 | PLUS@[15; 16) |
25 | QUESTION@[18; 19) | 25 | WHITESPACE@[16; 17) |
26 | PATH_TYPE@[19; 24) | 26 | TYPE_BOUND@[17; 25) |
27 | PATH@[19; 24) | 27 | L_PAREN@[17; 18) |
28 | PATH_SEGMENT@[19; 24) | 28 | QUESTION@[18; 19) |
29 | NAME_REF@[19; 24) | 29 | PATH_TYPE@[19; 24) |
30 | IDENT@[19; 24) "Sized" | 30 | PATH@[19; 24) |
31 | R_PAREN@[24; 25) | 31 | PATH_SEGMENT@[19; 24) |
32 | WHITESPACE@[25; 26) | 32 | NAME_REF@[19; 24) |
33 | PLUS@[26; 27) | 33 | IDENT@[19; 24) "Sized" |
34 | WHITESPACE@[27; 28) | 34 | R_PAREN@[24; 25) |
35 | L_PAREN@[28; 29) | 35 | WHITESPACE@[25; 26) |
36 | FOR_TYPE@[29; 46) | 36 | PLUS@[26; 27) |
37 | FOR_KW@[29; 32) | 37 | WHITESPACE@[27; 28) |
38 | TYPE_PARAM_LIST@[32; 36) | 38 | TYPE_BOUND@[28; 47) |
39 | L_ANGLE@[32; 33) | 39 | L_PAREN@[28; 29) |
40 | LIFETIME_PARAM@[33; 35) | 40 | FOR_TYPE@[29; 46) |
41 | LIFETIME@[33; 35) "'a" | 41 | FOR_KW@[29; 32) |
42 | R_ANGLE@[35; 36) | 42 | TYPE_PARAM_LIST@[32; 36) |
43 | WHITESPACE@[36; 37) | 43 | L_ANGLE@[32; 33) |
44 | PATH_TYPE@[37; 46) | 44 | LIFETIME_PARAM@[33; 35) |
45 | PATH@[37; 46) | 45 | LIFETIME@[33; 35) "'a" |
46 | PATH_SEGMENT@[37; 46) | 46 | R_ANGLE@[35; 36) |
47 | NAME_REF@[37; 42) | 47 | WHITESPACE@[36; 37) |
48 | IDENT@[37; 42) "Trait" | 48 | PATH_TYPE@[37; 46) |
49 | TYPE_ARG_LIST@[42; 46) | 49 | PATH@[37; 46) |
50 | L_ANGLE@[42; 43) | 50 | PATH_SEGMENT@[37; 46) |
51 | LIFETIME_ARG@[43; 45) | 51 | NAME_REF@[37; 42) |
52 | LIFETIME@[43; 45) "'a" | 52 | IDENT@[37; 42) "Trait" |
53 | R_ANGLE@[45; 46) | 53 | TYPE_ARG_LIST@[42; 46) |
54 | R_PAREN@[46; 47) | 54 | L_ANGLE@[42; 43) |
55 | LIFETIME_ARG@[43; 45) | ||
56 | LIFETIME@[43; 45) "'a" | ||
57 | R_ANGLE@[45; 46) | ||
58 | R_PAREN@[46; 47) | ||
55 | R_ANGLE@[47; 48) | 59 | R_ANGLE@[47; 48) |
56 | PARAM_LIST@[48; 50) | 60 | PARAM_LIST@[48; 50) |
57 | L_PAREN@[48; 49) | 61 | L_PAREN@[48; 49) |
@@ -80,60 +84,65 @@ SOURCE_FILE@[0; 240) | |||
80 | UNDERSCORE@[75; 76) | 84 | UNDERSCORE@[75; 76) |
81 | COLON@[76; 77) | 85 | COLON@[76; 77) |
82 | WHITESPACE@[77; 78) | 86 | WHITESPACE@[77; 78) |
83 | PATH_TYPE@[78; 121) | 87 | DYN_TRAIT_TYPE@[78; 121) |
84 | PATH@[78; 88) | 88 | TYPE_BOUND_LIST@[78; 121) |
85 | PATH_SEGMENT@[78; 88) | 89 | TYPE_BOUND@[78; 88) |
86 | NAME_REF@[78; 81) | 90 | PATH_TYPE@[78; 88) |
87 | IDENT@[78; 81) "Box" | 91 | PATH@[78; 88) |
88 | TYPE_ARG_LIST@[81; 88) | 92 | PATH_SEGMENT@[78; 88) |
89 | L_ANGLE@[81; 82) | 93 | NAME_REF@[78; 81) |
90 | TYPE_ARG@[82; 88) | 94 | IDENT@[78; 81) "Box" |
91 | PAREN_TYPE@[82; 88) | 95 | TYPE_ARG_LIST@[81; 88) |
92 | L_PAREN@[82; 83) | 96 | L_ANGLE@[81; 82) |
93 | PATH_TYPE@[83; 87) | 97 | TYPE_ARG@[82; 88) |
94 | PATH@[83; 87) | 98 | PAREN_TYPE@[82; 88) |
95 | PATH_SEGMENT@[83; 87) | 99 | L_PAREN@[82; 83) |
96 | NAME_REF@[83; 87) | 100 | PATH_TYPE@[83; 87) |
97 | IDENT@[83; 87) "Copy" | 101 | PATH@[83; 87) |
98 | R_PAREN@[87; 88) | 102 | PATH_SEGMENT@[83; 87) |
99 | err: `expected COMMA` | 103 | NAME_REF@[83; 87) |
100 | err: `expected R_ANGLE` | 104 | IDENT@[83; 87) "Copy" |
101 | WHITESPACE@[88; 89) | 105 | R_PAREN@[87; 88) |
102 | PLUS@[89; 90) | 106 | err: `expected COMMA` |
103 | WHITESPACE@[90; 91) | 107 | err: `expected R_ANGLE` |
104 | L_PAREN@[91; 92) | 108 | WHITESPACE@[88; 89) |
105 | QUESTION@[92; 93) | 109 | PLUS@[89; 90) |
106 | PATH_TYPE@[93; 98) | 110 | WHITESPACE@[90; 91) |
107 | PATH@[93; 98) | 111 | TYPE_BOUND@[91; 99) |
108 | PATH_SEGMENT@[93; 98) | 112 | L_PAREN@[91; 92) |
109 | NAME_REF@[93; 98) | 113 | QUESTION@[92; 93) |
110 | IDENT@[93; 98) "Sized" | 114 | PATH_TYPE@[93; 98) |
111 | R_PAREN@[98; 99) | 115 | PATH@[93; 98) |
112 | WHITESPACE@[99; 100) | 116 | PATH_SEGMENT@[93; 98) |
113 | PLUS@[100; 101) | 117 | NAME_REF@[93; 98) |
114 | WHITESPACE@[101; 102) | 118 | IDENT@[93; 98) "Sized" |
115 | L_PAREN@[102; 103) | 119 | R_PAREN@[98; 99) |
116 | FOR_TYPE@[103; 120) | 120 | WHITESPACE@[99; 100) |
117 | FOR_KW@[103; 106) | 121 | PLUS@[100; 101) |
118 | TYPE_PARAM_LIST@[106; 110) | 122 | WHITESPACE@[101; 102) |
119 | L_ANGLE@[106; 107) | 123 | TYPE_BOUND@[102; 121) |
120 | LIFETIME_PARAM@[107; 109) | 124 | L_PAREN@[102; 103) |
121 | LIFETIME@[107; 109) "'a" | 125 | FOR_TYPE@[103; 120) |
122 | R_ANGLE@[109; 110) | 126 | FOR_KW@[103; 106) |
123 | WHITESPACE@[110; 111) | 127 | TYPE_PARAM_LIST@[106; 110) |
124 | PATH_TYPE@[111; 120) | 128 | L_ANGLE@[106; 107) |
125 | PATH@[111; 120) | 129 | LIFETIME_PARAM@[107; 109) |
126 | PATH_SEGMENT@[111; 120) | 130 | LIFETIME@[107; 109) "'a" |
127 | NAME_REF@[111; 116) | 131 | R_ANGLE@[109; 110) |
128 | IDENT@[111; 116) "Trait" | 132 | WHITESPACE@[110; 111) |
129 | TYPE_ARG_LIST@[116; 120) | 133 | PATH_TYPE@[111; 120) |
130 | L_ANGLE@[116; 117) | 134 | PATH@[111; 120) |
131 | LIFETIME_ARG@[117; 119) | 135 | PATH_SEGMENT@[111; 120) |
132 | LIFETIME@[117; 119) "'a" | 136 | NAME_REF@[111; 116) |
133 | R_ANGLE@[119; 120) | 137 | IDENT@[111; 116) "Trait" |
134 | R_PAREN@[120; 121) | 138 | TYPE_ARG_LIST@[116; 120) |
135 | err: `expected SEMI` | 139 | L_ANGLE@[116; 117) |
136 | err: `expected expression` | 140 | LIFETIME_ARG@[117; 119) |
141 | LIFETIME@[117; 119) "'a" | ||
142 | R_ANGLE@[119; 120) | ||
143 | R_PAREN@[120; 121) | ||
144 | err: `expected SEMI` | ||
145 | err: `expected expression` | ||
137 | EXPR_STMT@[121; 123) | 146 | EXPR_STMT@[121; 123) |
138 | ERROR@[121; 122) | 147 | ERROR@[121; 122) |
139 | R_ANGLE@[121; 122) | 148 | R_ANGLE@[121; 122) |
@@ -247,60 +256,65 @@ SOURCE_FILE@[0; 240) | |||
247 | UNDERSCORE@[189; 190) | 256 | UNDERSCORE@[189; 190) |
248 | COLON@[190; 191) | 257 | COLON@[190; 191) |
249 | WHITESPACE@[191; 192) | 258 | WHITESPACE@[191; 192) |
250 | PATH_TYPE@[192; 235) | 259 | DYN_TRAIT_TYPE@[192; 235) |
251 | PATH@[192; 215) | 260 | TYPE_BOUND_LIST@[192; 235) |
252 | PATH_SEGMENT@[192; 215) | 261 | TYPE_BOUND@[192; 215) |
253 | NAME_REF@[192; 195) | 262 | PATH_TYPE@[192; 215) |
254 | IDENT@[192; 195) "Box" | 263 | PATH@[192; 215) |
255 | TYPE_ARG_LIST@[195; 215) | 264 | PATH_SEGMENT@[192; 215) |
256 | L_ANGLE@[195; 196) | 265 | NAME_REF@[192; 195) |
257 | TYPE_ARG@[196; 215) | 266 | IDENT@[192; 195) "Box" |
258 | PAREN_TYPE@[196; 215) | 267 | TYPE_ARG_LIST@[195; 215) |
259 | L_PAREN@[196; 197) | 268 | L_ANGLE@[195; 196) |
260 | FOR_TYPE@[197; 214) | 269 | TYPE_ARG@[196; 215) |
261 | FOR_KW@[197; 200) | 270 | PAREN_TYPE@[196; 215) |
262 | TYPE_PARAM_LIST@[200; 204) | 271 | L_PAREN@[196; 197) |
263 | L_ANGLE@[200; 201) | 272 | FOR_TYPE@[197; 214) |
264 | LIFETIME_PARAM@[201; 203) | 273 | FOR_KW@[197; 200) |
265 | LIFETIME@[201; 203) "'a" | 274 | TYPE_PARAM_LIST@[200; 204) |
266 | R_ANGLE@[203; 204) | 275 | L_ANGLE@[200; 201) |
267 | WHITESPACE@[204; 205) | 276 | LIFETIME_PARAM@[201; 203) |
268 | PATH_TYPE@[205; 214) | 277 | LIFETIME@[201; 203) "'a" |
269 | PATH@[205; 214) | 278 | R_ANGLE@[203; 204) |
270 | PATH_SEGMENT@[205; 214) | 279 | WHITESPACE@[204; 205) |
271 | NAME_REF@[205; 210) | 280 | PATH_TYPE@[205; 214) |
272 | IDENT@[205; 210) "Trait" | 281 | PATH@[205; 214) |
273 | TYPE_ARG_LIST@[210; 214) | 282 | PATH_SEGMENT@[205; 214) |
274 | L_ANGLE@[210; 211) | 283 | NAME_REF@[205; 210) |
275 | LIFETIME_ARG@[211; 213) | 284 | IDENT@[205; 210) "Trait" |
276 | LIFETIME@[211; 213) "'a" | 285 | TYPE_ARG_LIST@[210; 214) |
277 | R_ANGLE@[213; 214) | 286 | L_ANGLE@[210; 211) |
278 | R_PAREN@[214; 215) | 287 | LIFETIME_ARG@[211; 213) |
279 | err: `expected COMMA` | 288 | LIFETIME@[211; 213) "'a" |
280 | err: `expected R_ANGLE` | 289 | R_ANGLE@[213; 214) |
281 | WHITESPACE@[215; 216) | 290 | R_PAREN@[214; 215) |
282 | PLUS@[216; 217) | 291 | err: `expected COMMA` |
283 | WHITESPACE@[217; 218) | 292 | err: `expected R_ANGLE` |
284 | L_PAREN@[218; 219) | 293 | WHITESPACE@[215; 216) |
285 | PATH_TYPE@[219; 223) | 294 | PLUS@[216; 217) |
286 | PATH@[219; 223) | 295 | WHITESPACE@[217; 218) |
287 | PATH_SEGMENT@[219; 223) | 296 | TYPE_BOUND@[218; 224) |
288 | NAME_REF@[219; 223) | 297 | L_PAREN@[218; 219) |
289 | IDENT@[219; 223) "Copy" | 298 | PATH_TYPE@[219; 223) |
290 | R_PAREN@[223; 224) | 299 | PATH@[219; 223) |
291 | WHITESPACE@[224; 225) | 300 | PATH_SEGMENT@[219; 223) |
292 | PLUS@[225; 226) | 301 | NAME_REF@[219; 223) |
293 | WHITESPACE@[226; 227) | 302 | IDENT@[219; 223) "Copy" |
294 | L_PAREN@[227; 228) | 303 | R_PAREN@[223; 224) |
295 | QUESTION@[228; 229) | 304 | WHITESPACE@[224; 225) |
296 | PATH_TYPE@[229; 234) | 305 | PLUS@[225; 226) |
297 | PATH@[229; 234) | 306 | WHITESPACE@[226; 227) |
298 | PATH_SEGMENT@[229; 234) | 307 | TYPE_BOUND@[227; 235) |
299 | NAME_REF@[229; 234) | 308 | L_PAREN@[227; 228) |
300 | IDENT@[229; 234) "Sized" | 309 | QUESTION@[228; 229) |
301 | R_PAREN@[234; 235) | 310 | PATH_TYPE@[229; 234) |
302 | err: `expected SEMI` | 311 | PATH@[229; 234) |
303 | err: `expected expression` | 312 | PATH_SEGMENT@[229; 234) |
313 | NAME_REF@[229; 234) | ||
314 | IDENT@[229; 234) "Sized" | ||
315 | R_PAREN@[234; 235) | ||
316 | err: `expected SEMI` | ||
317 | err: `expected expression` | ||
304 | EXPR_STMT@[235; 237) | 318 | EXPR_STMT@[235; 237) |
305 | ERROR@[235; 236) | 319 | ERROR@[235; 236) |
306 | R_ANGLE@[235; 236) | 320 | R_ANGLE@[235; 236) |
diff --git a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt b/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt index 9b5fadcf7..a6d1a59ef 100644 --- a/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt +++ b/crates/ra_syntax/tests/data/parser/err/0026_imp_recovery.txt | |||
@@ -8,11 +8,13 @@ SOURCE_FILE@[0; 38) | |||
8 | IDENT@[5; 6) "T" | 8 | IDENT@[5; 6) "T" |
9 | COLON@[6; 7) | 9 | COLON@[6; 7) |
10 | WHITESPACE@[7; 8) | 10 | WHITESPACE@[7; 8) |
11 | PATH_TYPE@[8; 13) | 11 | TYPE_BOUND_LIST@[8; 13) |
12 | PATH@[8; 13) | 12 | TYPE_BOUND@[8; 13) |
13 | PATH_SEGMENT@[8; 13) | 13 | PATH_TYPE@[8; 13) |
14 | NAME_REF@[8; 13) | 14 | PATH@[8; 13) |
15 | IDENT@[8; 13) "Clone" | 15 | PATH_SEGMENT@[8; 13) |
16 | NAME_REF@[8; 13) | ||
17 | IDENT@[8; 13) "Clone" | ||
16 | R_ANGLE@[13; 14) | 18 | R_ANGLE@[13; 14) |
17 | err: `expected trait or type` | 19 | err: `expected trait or type` |
18 | err: `expected `{`` | 20 | err: `expected `{`` |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt index 7c9e1e621..39cadffbc 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt | |||
@@ -18,11 +18,13 @@ SOURCE_FILE@[0; 83) | |||
18 | IDENT@[18; 19) "A" | 18 | IDENT@[18; 19) "A" |
19 | COLON@[19; 20) | 19 | COLON@[19; 20) |
20 | WHITESPACE@[20; 21) | 20 | WHITESPACE@[20; 21) |
21 | PATH_TYPE@[21; 26) | 21 | TYPE_BOUND_LIST@[21; 26) |
22 | PATH@[21; 26) | 22 | TYPE_BOUND@[21; 26) |
23 | PATH_SEGMENT@[21; 26) | 23 | PATH_TYPE@[21; 26) |
24 | NAME_REF@[21; 26) | 24 | PATH@[21; 26) |
25 | IDENT@[21; 26) "Clone" | 25 | PATH_SEGMENT@[21; 26) |
26 | NAME_REF@[21; 26) | ||
27 | IDENT@[21; 26) "Clone" | ||
26 | SEMI@[26; 27) | 28 | SEMI@[26; 27) |
27 | WHITESPACE@[27; 32) | 29 | WHITESPACE@[27; 32) |
28 | CONST_DEF@[32; 45) | 30 | CONST_DEF@[32; 45) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt index 41420ea92..8bc29564e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0003_where_pred_for.txt | |||
@@ -33,24 +33,26 @@ SOURCE_FILE@[0; 49) | |||
33 | IDENT@[30; 31) "F" | 33 | IDENT@[30; 31) "F" |
34 | COLON@[31; 32) | 34 | COLON@[31; 32) |
35 | WHITESPACE@[32; 33) | 35 | WHITESPACE@[32; 33) |
36 | PATH_TYPE@[33; 44) | 36 | TYPE_BOUND_LIST@[33; 44) |
37 | PATH@[33; 44) | 37 | TYPE_BOUND@[33; 44) |
38 | PATH_SEGMENT@[33; 44) | 38 | PATH_TYPE@[33; 44) |
39 | NAME_REF@[33; 35) | 39 | PATH@[33; 44) |
40 | IDENT@[33; 35) "Fn" | 40 | PATH_SEGMENT@[33; 44) |
41 | PARAM_LIST@[35; 44) | 41 | NAME_REF@[33; 35) |
42 | L_PAREN@[35; 36) | 42 | IDENT@[33; 35) "Fn" |
43 | PARAM@[36; 43) | 43 | PARAM_LIST@[35; 44) |
44 | REFERENCE_TYPE@[36; 43) | 44 | L_PAREN@[35; 36) |
45 | AMP@[36; 37) | 45 | PARAM@[36; 43) |
46 | LIFETIME@[37; 39) "'a" | 46 | REFERENCE_TYPE@[36; 43) |
47 | WHITESPACE@[39; 40) | 47 | AMP@[36; 37) |
48 | PATH_TYPE@[40; 43) | 48 | LIFETIME@[37; 39) "'a" |
49 | PATH@[40; 43) | 49 | WHITESPACE@[39; 40) |
50 | PATH_SEGMENT@[40; 43) | 50 | PATH_TYPE@[40; 43) |
51 | NAME_REF@[40; 43) | 51 | PATH@[40; 43) |
52 | IDENT@[40; 43) "str" | 52 | PATH_SEGMENT@[40; 43) |
53 | R_PAREN@[43; 44) | 53 | NAME_REF@[40; 43) |
54 | IDENT@[40; 43) "str" | ||
55 | R_PAREN@[43; 44) | ||
54 | WHITESPACE@[44; 45) | 56 | WHITESPACE@[44; 45) |
55 | BLOCK@[45; 48) | 57 | BLOCK@[45; 48) |
56 | L_CURLY@[45; 46) | 58 | L_CURLY@[45; 46) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt index b20f13267..0cbe7c56c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0005_function_type_params.txt | |||
@@ -11,19 +11,22 @@ SOURCE_FILE@[0; 28) | |||
11 | IDENT@[7; 8) "T" | 11 | IDENT@[7; 8) "T" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 22) | 14 | TYPE_BOUND_LIST@[10; 22) |
15 | PATH@[10; 15) | 15 | TYPE_BOUND@[10; 15) |
16 | PATH_SEGMENT@[10; 15) | 16 | PATH_TYPE@[10; 15) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 15) |
18 | IDENT@[10; 15) "Clone" | 18 | PATH_SEGMENT@[10; 15) |
19 | NAME_REF@[10; 15) | ||
20 | IDENT@[10; 15) "Clone" | ||
19 | WHITESPACE@[15; 16) | 21 | WHITESPACE@[15; 16) |
20 | PLUS@[16; 17) | 22 | PLUS@[16; 17) |
21 | WHITESPACE@[17; 18) | 23 | WHITESPACE@[17; 18) |
22 | PATH_TYPE@[18; 22) | 24 | TYPE_BOUND@[18; 22) |
23 | PATH@[18; 22) | 25 | PATH_TYPE@[18; 22) |
24 | PATH_SEGMENT@[18; 22) | 26 | PATH@[18; 22) |
25 | NAME_REF@[18; 22) | 27 | PATH_SEGMENT@[18; 22) |
26 | IDENT@[18; 22) "Copy" | 28 | NAME_REF@[18; 22) |
29 | IDENT@[18; 22) "Copy" | ||
27 | R_ANGLE@[22; 23) | 30 | R_ANGLE@[22; 23) |
28 | PARAM_LIST@[23; 25) | 31 | PARAM_LIST@[23; 25) |
29 | L_PAREN@[23; 24) | 32 | L_PAREN@[23; 24) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt index 745cf8798..81479d2ea 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0007_type_param_bounds.txt | |||
@@ -11,26 +11,30 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[9; 10) "T" | 11 | IDENT@[9; 10) "T" |
12 | COLON@[10; 11) | 12 | COLON@[10; 11) |
13 | WHITESPACE@[11; 12) | 13 | WHITESPACE@[11; 12) |
14 | LIFETIME@[12; 14) "'a" | 14 | TYPE_BOUND_LIST@[12; 32) |
15 | WHITESPACE@[14; 15) | 15 | TYPE_BOUND@[12; 14) |
16 | PLUS@[15; 16) | 16 | LIFETIME@[12; 14) "'a" |
17 | WHITESPACE@[16; 17) | 17 | WHITESPACE@[14; 15) |
18 | QUESTION@[17; 18) | 18 | PLUS@[15; 16) |
19 | PATH_TYPE@[18; 32) | 19 | WHITESPACE@[16; 17) |
20 | PATH@[18; 23) | 20 | TYPE_BOUND@[17; 23) |
21 | PATH_SEGMENT@[18; 23) | 21 | QUESTION@[17; 18) |
22 | NAME_REF@[18; 23) | 22 | PATH_TYPE@[18; 23) |
23 | IDENT@[18; 23) "Sized" | 23 | PATH@[18; 23) |
24 | PATH_SEGMENT@[18; 23) | ||
25 | NAME_REF@[18; 23) | ||
26 | IDENT@[18; 23) "Sized" | ||
24 | WHITESPACE@[23; 24) | 27 | WHITESPACE@[23; 24) |
25 | PLUS@[24; 25) | 28 | PLUS@[24; 25) |
26 | WHITESPACE@[25; 26) | 29 | WHITESPACE@[25; 26) |
27 | L_PAREN@[26; 27) | 30 | TYPE_BOUND@[26; 32) |
28 | PATH_TYPE@[27; 31) | 31 | L_PAREN@[26; 27) |
29 | PATH@[27; 31) | 32 | PATH_TYPE@[27; 31) |
30 | PATH_SEGMENT@[27; 31) | 33 | PATH@[27; 31) |
31 | NAME_REF@[27; 31) | 34 | PATH_SEGMENT@[27; 31) |
32 | IDENT@[27; 31) "Copy" | 35 | NAME_REF@[27; 31) |
33 | R_PAREN@[31; 32) | 36 | IDENT@[27; 31) "Copy" |
37 | R_PAREN@[31; 32) | ||
34 | R_ANGLE@[32; 33) | 38 | R_ANGLE@[32; 33) |
35 | SEMI@[33; 34) | 39 | SEMI@[33; 34) |
36 | WHITESPACE@[34; 35) | 40 | WHITESPACE@[34; 35) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt index 9a5f46bab..c99a03155 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt | |||
@@ -16,11 +16,13 @@ SOURCE_FILE@[0; 31) | |||
16 | IDENT@[15; 18) "Foo" | 16 | IDENT@[15; 18) "Foo" |
17 | COLON@[18; 19) | 17 | COLON@[18; 19) |
18 | WHITESPACE@[19; 20) | 18 | WHITESPACE@[19; 20) |
19 | PATH_TYPE@[20; 24) | 19 | TYPE_BOUND_LIST@[20; 24) |
20 | PATH@[20; 24) | 20 | TYPE_BOUND@[20; 24) |
21 | PATH_SEGMENT@[20; 24) | 21 | PATH_TYPE@[20; 24) |
22 | NAME_REF@[20; 24) | 22 | PATH@[20; 24) |
23 | IDENT@[20; 24) "Copy" | 23 | PATH_SEGMENT@[20; 24) |
24 | NAME_REF@[20; 24) | ||
25 | IDENT@[20; 24) "Copy" | ||
24 | WHITESPACE@[24; 25) | 26 | WHITESPACE@[24; 25) |
25 | EQ@[25; 26) | 27 | EQ@[25; 26) |
26 | WHITESPACE@[26; 27) | 28 | WHITESPACE@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt index 3b676fb4c..31dbbe96c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 43) | |||
10 | IMPL_TRAIT_TYPE@[9; 41) | 10 | IMPL_TRAIT_TYPE@[9; 41) |
11 | IMPL_KW@[9; 13) | 11 | IMPL_KW@[9; 13) |
12 | WHITESPACE@[13; 14) | 12 | WHITESPACE@[13; 14) |
13 | PATH_TYPE@[14; 41) | 13 | TYPE_BOUND_LIST@[14; 41) |
14 | PATH@[14; 36) | 14 | TYPE_BOUND@[14; 36) |
15 | PATH_SEGMENT@[14; 36) | 15 | PATH_TYPE@[14; 36) |
16 | NAME_REF@[14; 22) | 16 | PATH@[14; 36) |
17 | IDENT@[14; 22) "Iterator" | 17 | PATH_SEGMENT@[14; 36) |
18 | TYPE_ARG_LIST@[22; 36) | 18 | NAME_REF@[14; 22) |
19 | L_ANGLE@[22; 23) | 19 | IDENT@[14; 22) "Iterator" |
20 | ASSOC_TYPE_ARG@[23; 35) | 20 | TYPE_ARG_LIST@[22; 36) |
21 | NAME_REF@[23; 27) | 21 | L_ANGLE@[22; 23) |
22 | IDENT@[23; 27) "Item" | 22 | ASSOC_TYPE_ARG@[23; 35) |
23 | EQ@[27; 28) | 23 | NAME_REF@[23; 27) |
24 | PATH_TYPE@[28; 35) | 24 | IDENT@[23; 27) "Item" |
25 | PATH@[28; 35) | 25 | EQ@[27; 28) |
26 | PATH_SEGMENT@[28; 35) | 26 | PATH_TYPE@[28; 35) |
27 | NAME_REF@[28; 31) | 27 | PATH@[28; 35) |
28 | IDENT@[28; 31) "Foo" | 28 | PATH_SEGMENT@[28; 35) |
29 | TYPE_ARG_LIST@[31; 35) | 29 | NAME_REF@[28; 31) |
30 | L_ANGLE@[31; 32) | 30 | IDENT@[28; 31) "Foo" |
31 | LIFETIME_ARG@[32; 34) | 31 | TYPE_ARG_LIST@[31; 35) |
32 | LIFETIME@[32; 34) "'a" | 32 | L_ANGLE@[31; 32) |
33 | R_ANGLE@[34; 35) | 33 | LIFETIME_ARG@[32; 34) |
34 | R_ANGLE@[35; 36) | 34 | LIFETIME@[32; 34) "'a" |
35 | R_ANGLE@[34; 35) | ||
36 | R_ANGLE@[35; 36) | ||
35 | WHITESPACE@[36; 37) | 37 | WHITESPACE@[36; 37) |
36 | PLUS@[37; 38) | 38 | PLUS@[37; 38) |
37 | WHITESPACE@[38; 39) | 39 | WHITESPACE@[38; 39) |
38 | LIFETIME@[39; 41) "'a" | 40 | TYPE_BOUND@[39; 41) |
41 | LIFETIME@[39; 41) "'a" | ||
39 | SEMI@[41; 42) | 42 | SEMI@[41; 42) |
40 | WHITESPACE@[42; 43) | 43 | WHITESPACE@[42; 43) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs index 4385afca9..32761dd03 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.rs | |||
@@ -1 +1,2 @@ | |||
1 | trait T<U>: Hash + Clone where U: Copy {} | 1 | trait T<U>: Hash + Clone where U: Copy {} |
2 | trait X<U: Debug + Display>: Hash + Clone where U: Copy {} | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt index 333a737ec..56cfea5b3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0041_trait_item.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 42) | 1 | SOURCE_FILE@[0; 101) |
2 | TRAIT_DEF@[0; 41) | 2 | TRAIT_DEF@[0; 41) |
3 | TRAIT_KW@[0; 5) | 3 | TRAIT_KW@[0; 5) |
4 | WHITESPACE@[5; 6) | 4 | WHITESPACE@[5; 6) |
@@ -12,19 +12,22 @@ SOURCE_FILE@[0; 42) | |||
12 | R_ANGLE@[9; 10) | 12 | R_ANGLE@[9; 10) |
13 | COLON@[10; 11) | 13 | COLON@[10; 11) |
14 | WHITESPACE@[11; 12) | 14 | WHITESPACE@[11; 12) |
15 | PATH_TYPE@[12; 24) | 15 | TYPE_BOUND_LIST@[12; 24) |
16 | PATH@[12; 16) | 16 | TYPE_BOUND@[12; 16) |
17 | PATH_SEGMENT@[12; 16) | 17 | PATH_TYPE@[12; 16) |
18 | NAME_REF@[12; 16) | 18 | PATH@[12; 16) |
19 | IDENT@[12; 16) "Hash" | 19 | PATH_SEGMENT@[12; 16) |
20 | NAME_REF@[12; 16) | ||
21 | IDENT@[12; 16) "Hash" | ||
20 | WHITESPACE@[16; 17) | 22 | WHITESPACE@[16; 17) |
21 | PLUS@[17; 18) | 23 | PLUS@[17; 18) |
22 | WHITESPACE@[18; 19) | 24 | WHITESPACE@[18; 19) |
23 | PATH_TYPE@[19; 24) | 25 | TYPE_BOUND@[19; 24) |
24 | PATH@[19; 24) | 26 | PATH_TYPE@[19; 24) |
25 | PATH_SEGMENT@[19; 24) | 27 | PATH@[19; 24) |
26 | NAME_REF@[19; 24) | 28 | PATH_SEGMENT@[19; 24) |
27 | IDENT@[19; 24) "Clone" | 29 | NAME_REF@[19; 24) |
30 | IDENT@[19; 24) "Clone" | ||
28 | WHITESPACE@[24; 25) | 31 | WHITESPACE@[24; 25) |
29 | WHERE_CLAUSE@[25; 38) | 32 | WHERE_CLAUSE@[25; 38) |
30 | WHERE_KW@[25; 30) | 33 | WHERE_KW@[25; 30) |
@@ -37,13 +40,86 @@ SOURCE_FILE@[0; 42) | |||
37 | IDENT@[31; 32) "U" | 40 | IDENT@[31; 32) "U" |
38 | COLON@[32; 33) | 41 | COLON@[32; 33) |
39 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
40 | PATH_TYPE@[34; 38) | 43 | TYPE_BOUND_LIST@[34; 38) |
41 | PATH@[34; 38) | 44 | TYPE_BOUND@[34; 38) |
42 | PATH_SEGMENT@[34; 38) | 45 | PATH_TYPE@[34; 38) |
43 | NAME_REF@[34; 38) | 46 | PATH@[34; 38) |
44 | IDENT@[34; 38) "Copy" | 47 | PATH_SEGMENT@[34; 38) |
48 | NAME_REF@[34; 38) | ||
49 | IDENT@[34; 38) "Copy" | ||
45 | WHITESPACE@[38; 39) | 50 | WHITESPACE@[38; 39) |
46 | ITEM_LIST@[39; 41) | 51 | ITEM_LIST@[39; 41) |
47 | L_CURLY@[39; 40) | 52 | L_CURLY@[39; 40) |
48 | R_CURLY@[40; 41) | 53 | R_CURLY@[40; 41) |
49 | WHITESPACE@[41; 42) | 54 | WHITESPACE@[41; 42) |
55 | TRAIT_DEF@[42; 100) | ||
56 | TRAIT_KW@[42; 47) | ||
57 | WHITESPACE@[47; 48) | ||
58 | NAME@[48; 49) | ||
59 | IDENT@[48; 49) "X" | ||
60 | TYPE_PARAM_LIST@[49; 69) | ||
61 | L_ANGLE@[49; 50) | ||
62 | TYPE_PARAM@[50; 68) | ||
63 | NAME@[50; 51) | ||
64 | IDENT@[50; 51) "U" | ||
65 | COLON@[51; 52) | ||
66 | WHITESPACE@[52; 53) | ||
67 | TYPE_BOUND_LIST@[53; 68) | ||
68 | TYPE_BOUND@[53; 58) | ||
69 | PATH_TYPE@[53; 58) | ||
70 | PATH@[53; 58) | ||
71 | PATH_SEGMENT@[53; 58) | ||
72 | NAME_REF@[53; 58) | ||
73 | IDENT@[53; 58) "Debug" | ||
74 | WHITESPACE@[58; 59) | ||
75 | PLUS@[59; 60) | ||
76 | WHITESPACE@[60; 61) | ||
77 | TYPE_BOUND@[61; 68) | ||
78 | PATH_TYPE@[61; 68) | ||
79 | PATH@[61; 68) | ||
80 | PATH_SEGMENT@[61; 68) | ||
81 | NAME_REF@[61; 68) | ||
82 | IDENT@[61; 68) "Display" | ||
83 | R_ANGLE@[68; 69) | ||
84 | COLON@[69; 70) | ||
85 | WHITESPACE@[70; 71) | ||
86 | TYPE_BOUND_LIST@[71; 83) | ||
87 | TYPE_BOUND@[71; 75) | ||
88 | PATH_TYPE@[71; 75) | ||
89 | PATH@[71; 75) | ||
90 | PATH_SEGMENT@[71; 75) | ||
91 | NAME_REF@[71; 75) | ||
92 | IDENT@[71; 75) "Hash" | ||
93 | WHITESPACE@[75; 76) | ||
94 | PLUS@[76; 77) | ||
95 | WHITESPACE@[77; 78) | ||
96 | TYPE_BOUND@[78; 83) | ||
97 | PATH_TYPE@[78; 83) | ||
98 | PATH@[78; 83) | ||
99 | PATH_SEGMENT@[78; 83) | ||
100 | NAME_REF@[78; 83) | ||
101 | IDENT@[78; 83) "Clone" | ||
102 | WHITESPACE@[83; 84) | ||
103 | WHERE_CLAUSE@[84; 97) | ||
104 | WHERE_KW@[84; 89) | ||
105 | WHITESPACE@[89; 90) | ||
106 | WHERE_PRED@[90; 97) | ||
107 | PATH_TYPE@[90; 91) | ||
108 | PATH@[90; 91) | ||
109 | PATH_SEGMENT@[90; 91) | ||
110 | NAME_REF@[90; 91) | ||
111 | IDENT@[90; 91) "U" | ||
112 | COLON@[91; 92) | ||
113 | WHITESPACE@[92; 93) | ||
114 | TYPE_BOUND_LIST@[93; 97) | ||
115 | TYPE_BOUND@[93; 97) | ||
116 | PATH_TYPE@[93; 97) | ||
117 | PATH@[93; 97) | ||
118 | PATH_SEGMENT@[93; 97) | ||
119 | NAME_REF@[93; 97) | ||
120 | IDENT@[93; 97) "Copy" | ||
121 | WHITESPACE@[97; 98) | ||
122 | ITEM_LIST@[98; 100) | ||
123 | L_CURLY@[98; 99) | ||
124 | R_CURLY@[99; 100) | ||
125 | WHITESPACE@[100; 101) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt index 2ce7a6714..3786a787a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0045_param_list_opt_patterns.txt | |||
@@ -11,29 +11,31 @@ SOURCE_FILE@[0; 35) | |||
11 | IDENT@[7; 8) "F" | 11 | IDENT@[7; 8) "F" |
12 | COLON@[8; 9) | 12 | COLON@[8; 9) |
13 | WHITESPACE@[9; 10) | 13 | WHITESPACE@[9; 10) |
14 | PATH_TYPE@[10; 29) | 14 | TYPE_BOUND_LIST@[10; 29) |
15 | PATH@[10; 29) | 15 | TYPE_BOUND@[10; 29) |
16 | PATH_SEGMENT@[10; 29) | 16 | PATH_TYPE@[10; 29) |
17 | NAME_REF@[10; 15) | 17 | PATH@[10; 29) |
18 | IDENT@[10; 15) "FnMut" | 18 | PATH_SEGMENT@[10; 29) |
19 | PARAM_LIST@[15; 29) | 19 | NAME_REF@[10; 15) |
20 | L_PAREN@[15; 16) | 20 | IDENT@[10; 15) "FnMut" |
21 | PARAM@[16; 28) | 21 | PARAM_LIST@[15; 29) |
22 | REFERENCE_TYPE@[16; 28) | 22 | L_PAREN@[15; 16) |
23 | AMP@[16; 17) | 23 | PARAM@[16; 28) |
24 | MUT_KW@[17; 20) | 24 | REFERENCE_TYPE@[16; 28) |
25 | WHITESPACE@[20; 21) | 25 | AMP@[16; 17) |
26 | PATH_TYPE@[21; 28) | 26 | MUT_KW@[17; 20) |
27 | PATH@[21; 28) | 27 | WHITESPACE@[20; 21) |
28 | PATH_SEGMENT@[21; 28) | 28 | PATH_TYPE@[21; 28) |
29 | NAME_REF@[21; 24) | 29 | PATH@[21; 28) |
30 | IDENT@[21; 24) "Foo" | 30 | PATH_SEGMENT@[21; 28) |
31 | TYPE_ARG_LIST@[24; 28) | 31 | NAME_REF@[21; 24) |
32 | L_ANGLE@[24; 25) | 32 | IDENT@[21; 24) "Foo" |
33 | LIFETIME_ARG@[25; 27) | 33 | TYPE_ARG_LIST@[24; 28) |
34 | LIFETIME@[25; 27) "'a" | 34 | L_ANGLE@[24; 25) |
35 | R_ANGLE@[27; 28) | 35 | LIFETIME_ARG@[25; 27) |
36 | R_PAREN@[28; 29) | 36 | LIFETIME@[25; 27) "'a" |
37 | R_ANGLE@[27; 28) | ||
38 | R_PAREN@[28; 29) | ||
37 | R_ANGLE@[29; 30) | 39 | R_ANGLE@[29; 30) |
38 | PARAM_LIST@[30; 32) | 40 | PARAM_LIST@[30; 32) |
39 | L_PAREN@[30; 31) | 41 | L_PAREN@[30; 31) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs index 215210e27..4bb0f63b7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.rs | |||
@@ -1 +1,2 @@ | |||
1 | fn foo() -> Box<T + 'f> {} | 1 | fn foo() -> Box<T + 'f> {} |
2 | fn foo() -> Box<dyn T + 'f> {} | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt index 911a27ea1..6faf4d3b9 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0048_path_type_with_bounds.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 27) | 1 | SOURCE_FILE@[0; 58) |
2 | FN_DEF@[0; 26) | 2 | FN_DEF@[0; 26) |
3 | FN_KW@[0; 2) | 3 | FN_KW@[0; 2) |
4 | WHITESPACE@[2; 3) | 4 | WHITESPACE@[2; 3) |
@@ -19,18 +19,63 @@ SOURCE_FILE@[0; 27) | |||
19 | TYPE_ARG_LIST@[15; 23) | 19 | TYPE_ARG_LIST@[15; 23) |
20 | L_ANGLE@[15; 16) | 20 | L_ANGLE@[15; 16) |
21 | TYPE_ARG@[16; 22) | 21 | TYPE_ARG@[16; 22) |
22 | PATH_TYPE@[16; 22) | 22 | DYN_TRAIT_TYPE@[16; 22) |
23 | PATH@[16; 17) | 23 | TYPE_BOUND_LIST@[16; 22) |
24 | PATH_SEGMENT@[16; 17) | 24 | TYPE_BOUND@[16; 17) |
25 | NAME_REF@[16; 17) | 25 | PATH_TYPE@[16; 17) |
26 | IDENT@[16; 17) "T" | 26 | PATH@[16; 17) |
27 | WHITESPACE@[17; 18) | 27 | PATH_SEGMENT@[16; 17) |
28 | PLUS@[18; 19) | 28 | NAME_REF@[16; 17) |
29 | WHITESPACE@[19; 20) | 29 | IDENT@[16; 17) "T" |
30 | LIFETIME@[20; 22) "'f" | 30 | WHITESPACE@[17; 18) |
31 | PLUS@[18; 19) | ||
32 | WHITESPACE@[19; 20) | ||
33 | TYPE_BOUND@[20; 22) | ||
34 | LIFETIME@[20; 22) "'f" | ||
31 | R_ANGLE@[22; 23) | 35 | R_ANGLE@[22; 23) |
32 | WHITESPACE@[23; 24) | 36 | WHITESPACE@[23; 24) |
33 | BLOCK@[24; 26) | 37 | BLOCK@[24; 26) |
34 | L_CURLY@[24; 25) | 38 | L_CURLY@[24; 25) |
35 | R_CURLY@[25; 26) | 39 | R_CURLY@[25; 26) |
36 | WHITESPACE@[26; 27) | 40 | WHITESPACE@[26; 27) |
41 | FN_DEF@[27; 57) | ||
42 | FN_KW@[27; 29) | ||
43 | WHITESPACE@[29; 30) | ||
44 | NAME@[30; 33) | ||
45 | IDENT@[30; 33) "foo" | ||
46 | PARAM_LIST@[33; 35) | ||
47 | L_PAREN@[33; 34) | ||
48 | R_PAREN@[34; 35) | ||
49 | WHITESPACE@[35; 36) | ||
50 | RET_TYPE@[36; 54) | ||
51 | THIN_ARROW@[36; 38) | ||
52 | WHITESPACE@[38; 39) | ||
53 | PATH_TYPE@[39; 54) | ||
54 | PATH@[39; 54) | ||
55 | PATH_SEGMENT@[39; 54) | ||
56 | NAME_REF@[39; 42) | ||
57 | IDENT@[39; 42) "Box" | ||
58 | TYPE_ARG_LIST@[42; 54) | ||
59 | L_ANGLE@[42; 43) | ||
60 | TYPE_ARG@[43; 53) | ||
61 | DYN_TRAIT_TYPE@[43; 53) | ||
62 | DYN_KW@[43; 46) | ||
63 | WHITESPACE@[46; 47) | ||
64 | TYPE_BOUND_LIST@[47; 53) | ||
65 | TYPE_BOUND@[47; 48) | ||
66 | PATH_TYPE@[47; 48) | ||
67 | PATH@[47; 48) | ||
68 | PATH_SEGMENT@[47; 48) | ||
69 | NAME_REF@[47; 48) | ||
70 | IDENT@[47; 48) "T" | ||
71 | WHITESPACE@[48; 49) | ||
72 | PLUS@[49; 50) | ||
73 | WHITESPACE@[50; 51) | ||
74 | TYPE_BOUND@[51; 53) | ||
75 | LIFETIME@[51; 53) "'f" | ||
76 | R_ANGLE@[53; 54) | ||
77 | WHITESPACE@[54; 55) | ||
78 | BLOCK@[55; 57) | ||
79 | L_CURLY@[55; 56) | ||
80 | R_CURLY@[56; 57) | ||
81 | WHITESPACE@[57; 58) | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt index 68485dc0b..e04b61eb3 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0056_where_clause.txt | |||
@@ -30,22 +30,26 @@ SOURCE_FILE@[0; 116) | |||
30 | IDENT@[34; 35) "T" | 30 | IDENT@[34; 35) "T" |
31 | COLON@[35; 36) | 31 | COLON@[35; 36) |
32 | WHITESPACE@[36; 37) | 32 | WHITESPACE@[36; 37) |
33 | PATH_TYPE@[37; 59) | 33 | TYPE_BOUND_LIST@[37; 59) |
34 | PATH@[37; 42) | 34 | TYPE_BOUND@[37; 42) |
35 | PATH_SEGMENT@[37; 42) | 35 | PATH_TYPE@[37; 42) |
36 | NAME_REF@[37; 42) | 36 | PATH@[37; 42) |
37 | IDENT@[37; 42) "Clone" | 37 | PATH_SEGMENT@[37; 42) |
38 | NAME_REF@[37; 42) | ||
39 | IDENT@[37; 42) "Clone" | ||
38 | WHITESPACE@[42; 43) | 40 | WHITESPACE@[42; 43) |
39 | PLUS@[43; 44) | 41 | PLUS@[43; 44) |
40 | WHITESPACE@[44; 45) | 42 | WHITESPACE@[44; 45) |
41 | PATH_TYPE@[45; 59) | 43 | TYPE_BOUND@[45; 49) |
42 | PATH@[45; 49) | 44 | PATH_TYPE@[45; 49) |
43 | PATH_SEGMENT@[45; 49) | 45 | PATH@[45; 49) |
44 | NAME_REF@[45; 49) | 46 | PATH_SEGMENT@[45; 49) |
45 | IDENT@[45; 49) "Copy" | 47 | NAME_REF@[45; 49) |
46 | WHITESPACE@[49; 50) | 48 | IDENT@[45; 49) "Copy" |
47 | PLUS@[50; 51) | 49 | WHITESPACE@[49; 50) |
48 | WHITESPACE@[51; 52) | 50 | PLUS@[50; 51) |
51 | WHITESPACE@[51; 52) | ||
52 | TYPE_BOUND@[52; 59) | ||
49 | LIFETIME@[52; 59) "'static" | 53 | LIFETIME@[52; 59) "'static" |
50 | COMMA@[59; 60) | 54 | COMMA@[59; 60) |
51 | WHITESPACE@[60; 64) | 55 | WHITESPACE@[60; 64) |
@@ -62,7 +66,9 @@ SOURCE_FILE@[0; 116) | |||
62 | IDENT@[74; 78) "Item" | 66 | IDENT@[74; 78) "Item" |
63 | COLON@[78; 79) | 67 | COLON@[78; 79) |
64 | WHITESPACE@[79; 80) | 68 | WHITESPACE@[79; 80) |
65 | LIFETIME@[80; 82) "'a" | 69 | TYPE_BOUND_LIST@[80; 82) |
70 | TYPE_BOUND@[80; 82) | ||
71 | LIFETIME@[80; 82) "'a" | ||
66 | COMMA@[82; 83) | 72 | COMMA@[82; 83) |
67 | WHITESPACE@[83; 87) | 73 | WHITESPACE@[83; 87) |
68 | WHERE_PRED@[87; 112) | 74 | WHERE_PRED@[87; 112) |
@@ -91,7 +97,9 @@ SOURCE_FILE@[0; 116) | |||
91 | IDENT@[104; 108) "Item" | 97 | IDENT@[104; 108) "Item" |
92 | COLON@[108; 109) | 98 | COLON@[108; 109) |
93 | WHITESPACE@[109; 110) | 99 | WHITESPACE@[109; 110) |
94 | LIFETIME@[110; 112) "'a" | 100 | TYPE_BOUND_LIST@[110; 112) |
101 | TYPE_BOUND@[110; 112) | ||
102 | LIFETIME@[110; 112) "'a" | ||
95 | WHITESPACE@[112; 113) | 103 | WHITESPACE@[112; 113) |
96 | BLOCK@[113; 115) | 104 | BLOCK@[113; 115) |
97 | L_CURLY@[113; 114) | 105 | L_CURLY@[113; 114) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt index f6a0967f2..e33d8ada1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt | |||
@@ -10,31 +10,34 @@ SOURCE_FILE@[0; 42) | |||
10 | DYN_TRAIT_TYPE@[9; 40) | 10 | DYN_TRAIT_TYPE@[9; 40) |
11 | DYN_KW@[9; 12) | 11 | DYN_KW@[9; 12) |
12 | WHITESPACE@[12; 13) | 12 | WHITESPACE@[12; 13) |
13 | PATH_TYPE@[13; 40) | 13 | TYPE_BOUND_LIST@[13; 40) |
14 | PATH@[13; 35) | 14 | TYPE_BOUND@[13; 35) |
15 | PATH_SEGMENT@[13; 35) | 15 | PATH_TYPE@[13; 35) |
16 | NAME_REF@[13; 21) | 16 | PATH@[13; 35) |
17 | IDENT@[13; 21) "Iterator" | 17 | PATH_SEGMENT@[13; 35) |
18 | TYPE_ARG_LIST@[21; 35) | 18 | NAME_REF@[13; 21) |
19 | L_ANGLE@[21; 22) | 19 | IDENT@[13; 21) "Iterator" |
20 | ASSOC_TYPE_ARG@[22; 34) | 20 | TYPE_ARG_LIST@[21; 35) |
21 | NAME_REF@[22; 26) | 21 | L_ANGLE@[21; 22) |
22 | IDENT@[22; 26) "Item" | 22 | ASSOC_TYPE_ARG@[22; 34) |
23 | EQ@[26; 27) | 23 | NAME_REF@[22; 26) |
24 | PATH_TYPE@[27; 34) | 24 | IDENT@[22; 26) "Item" |
25 | PATH@[27; 34) | 25 | EQ@[26; 27) |
26 | PATH_SEGMENT@[27; 34) | 26 | PATH_TYPE@[27; 34) |
27 | NAME_REF@[27; 30) | 27 | PATH@[27; 34) |
28 | IDENT@[27; 30) "Foo" | 28 | PATH_SEGMENT@[27; 34) |
29 | TYPE_ARG_LIST@[30; 34) | 29 | NAME_REF@[27; 30) |
30 | L_ANGLE@[30; 31) | 30 | IDENT@[27; 30) "Foo" |
31 | LIFETIME_ARG@[31; 33) | 31 | TYPE_ARG_LIST@[30; 34) |
32 | LIFETIME@[31; 33) "'a" | 32 | L_ANGLE@[30; 31) |
33 | R_ANGLE@[33; 34) | 33 | LIFETIME_ARG@[31; 33) |
34 | R_ANGLE@[34; 35) | 34 | LIFETIME@[31; 33) "'a" |
35 | R_ANGLE@[33; 34) | ||
36 | R_ANGLE@[34; 35) | ||
35 | WHITESPACE@[35; 36) | 37 | WHITESPACE@[35; 36) |
36 | PLUS@[36; 37) | 38 | PLUS@[36; 37) |
37 | WHITESPACE@[37; 38) | 39 | WHITESPACE@[37; 38) |
38 | LIFETIME@[38; 40) "'a" | 40 | TYPE_BOUND@[38; 40) |
41 | LIFETIME@[38; 40) "'a" | ||
39 | SEMI@[40; 41) | 42 | SEMI@[40; 41) |
40 | WHITESPACE@[41; 42) | 43 | WHITESPACE@[41; 42) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt index b58d09e35..1603b531e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0076_function_where_clause.txt | |||
@@ -25,11 +25,13 @@ SOURCE_FILE@[0; 29) | |||
25 | IDENT@[18; 19) "T" | 25 | IDENT@[18; 19) "T" |
26 | COLON@[19; 20) | 26 | COLON@[19; 20) |
27 | WHITESPACE@[20; 21) | 27 | WHITESPACE@[20; 21) |
28 | PATH_TYPE@[21; 25) | 28 | TYPE_BOUND_LIST@[21; 25) |
29 | PATH@[21; 25) | 29 | TYPE_BOUND@[21; 25) |
30 | PATH_SEGMENT@[21; 25) | 30 | PATH_TYPE@[21; 25) |
31 | NAME_REF@[21; 25) | 31 | PATH@[21; 25) |
32 | IDENT@[21; 25) "Copy" | 32 | PATH_SEGMENT@[21; 25) |
33 | NAME_REF@[21; 25) | ||
34 | IDENT@[21; 25) "Copy" | ||
33 | WHITESPACE@[25; 26) | 35 | WHITESPACE@[25; 26) |
34 | BLOCK@[26; 28) | 36 | BLOCK@[26; 28) |
35 | L_CURLY@[26; 27) | 37 | L_CURLY@[26; 27) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt index 568f61fb2..36c856cd7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt | |||
@@ -80,11 +80,13 @@ SOURCE_FILE@[0; 135) | |||
80 | IDENT@[65; 66) "T" | 80 | IDENT@[65; 66) "T" |
81 | COLON@[66; 67) | 81 | COLON@[66; 67) |
82 | WHITESPACE@[67; 68) | 82 | WHITESPACE@[67; 68) |
83 | PATH_TYPE@[68; 76) | 83 | TYPE_BOUND_LIST@[68; 76) |
84 | PATH@[68; 76) | 84 | TYPE_BOUND@[68; 76) |
85 | PATH_SEGMENT@[68; 76) | 85 | PATH_TYPE@[68; 76) |
86 | NAME_REF@[68; 76) | 86 | PATH@[68; 76) |
87 | IDENT@[68; 76) "Iterator" | 87 | PATH_SEGMENT@[68; 76) |
88 | NAME_REF@[68; 76) | ||
89 | IDENT@[68; 76) "Iterator" | ||
88 | WHITESPACE@[76; 77) | 90 | WHITESPACE@[76; 77) |
89 | BLOCK@[77; 79) | 91 | BLOCK@[77; 79) |
90 | L_CURLY@[77; 78) | 92 | L_CURLY@[77; 78) |
@@ -143,11 +145,13 @@ SOURCE_FILE@[0; 135) | |||
143 | IDENT@[120; 121) "T" | 145 | IDENT@[120; 121) "T" |
144 | COLON@[121; 122) | 146 | COLON@[121; 122) |
145 | WHITESPACE@[122; 123) | 147 | WHITESPACE@[122; 123) |
146 | PATH_TYPE@[123; 131) | 148 | TYPE_BOUND_LIST@[123; 131) |
147 | PATH@[123; 131) | 149 | TYPE_BOUND@[123; 131) |
148 | PATH_SEGMENT@[123; 131) | 150 | PATH_TYPE@[123; 131) |
149 | NAME_REF@[123; 131) | 151 | PATH@[123; 131) |
150 | IDENT@[123; 131) "Iterator" | 152 | PATH_SEGMENT@[123; 131) |
153 | NAME_REF@[123; 131) | ||
154 | IDENT@[123; 131) "Iterator" | ||
151 | WHITESPACE@[131; 132) | 155 | WHITESPACE@[131; 132) |
152 | BLOCK@[132; 134) | 156 | BLOCK@[132; 134) |
153 | L_CURLY@[132; 133) | 157 | L_CURLY@[132; 133) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt index 4f439f21c..dec038fc1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt | |||
@@ -31,11 +31,13 @@ SOURCE_FILE@[0; 53) | |||
31 | IDENT@[24; 25) "T" | 31 | IDENT@[24; 25) "T" |
32 | COLON@[25; 26) | 32 | COLON@[25; 26) |
33 | WHITESPACE@[26; 27) | 33 | WHITESPACE@[26; 27) |
34 | PATH_TYPE@[27; 32) | 34 | TYPE_BOUND_LIST@[27; 32) |
35 | PATH@[27; 32) | 35 | TYPE_BOUND@[27; 32) |
36 | PATH_SEGMENT@[27; 32) | 36 | PATH_TYPE@[27; 32) |
37 | NAME_REF@[27; 32) | 37 | PATH@[27; 32) |
38 | IDENT@[27; 32) "Clone" | 38 | PATH_SEGMENT@[27; 32) |
39 | NAME_REF@[27; 32) | ||
40 | IDENT@[27; 32) "Clone" | ||
39 | SEMI@[32; 33) | 41 | SEMI@[32; 33) |
40 | WHITESPACE@[33; 34) | 42 | WHITESPACE@[33; 34) |
41 | STRUCT_DEF@[34; 52) | 43 | STRUCT_DEF@[34; 52) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt b/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt index 12497e1a9..b49206d80 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0001_struct_item.txt | |||
@@ -11,11 +11,13 @@ SOURCE_FILE@[0; 32) | |||
11 | IDENT@[9; 10) "T" | 11 | IDENT@[9; 10) "T" |
12 | COLON@[10; 11) | 12 | COLON@[10; 11) |
13 | WHITESPACE@[11; 12) | 13 | WHITESPACE@[11; 12) |
14 | PATH_TYPE@[12; 16) | 14 | TYPE_BOUND_LIST@[12; 16) |
15 | PATH@[12; 16) | 15 | TYPE_BOUND@[12; 16) |
16 | PATH_SEGMENT@[12; 16) | 16 | PATH_TYPE@[12; 16) |
17 | NAME_REF@[12; 16) | 17 | PATH@[12; 16) |
18 | IDENT@[12; 16) "Copy" | 18 | PATH_SEGMENT@[12; 16) |
19 | NAME_REF@[12; 16) | ||
20 | IDENT@[12; 16) "Copy" | ||
19 | R_ANGLE@[16; 17) | 21 | R_ANGLE@[16; 17) |
20 | WHITESPACE@[17; 18) | 22 | WHITESPACE@[17; 18) |
21 | NAMED_FIELD_DEF_LIST@[18; 31) | 23 | NAMED_FIELD_DEF_LIST@[18; 31) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs b/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs index a1b9f00a4..712898978 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs +++ b/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.rs | |||
@@ -7,3 +7,4 @@ struct F<T: 'a + 'd + Clone>; | |||
7 | struct G<T: Clone + Copy>; | 7 | struct G<T: Clone + Copy>; |
8 | struct H<T: ::Foo + self::Bar + 'a>; | 8 | struct H<T: ::Foo + self::Bar + 'a>; |
9 | struct I<T:, U:,>; | 9 | struct I<T:, U:,>; |
10 | struct K<'a: 'd, 'd: 'a + 'b, T: 'a + 'd + Clone>; \ No newline at end of file | ||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt b/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt index b70a1d19a..04aaca4c4 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0020_type_param_bounds.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | SOURCE_FILE@[0; 200) | 1 | SOURCE_FILE@[0; 250) |
2 | STRUCT_DEF@[0; 12) | 2 | STRUCT_DEF@[0; 12) |
3 | STRUCT_KW@[0; 6) | 3 | STRUCT_KW@[0; 6) |
4 | WHITESPACE@[6; 7) | 4 | WHITESPACE@[6; 7) |
@@ -23,6 +23,7 @@ SOURCE_FILE@[0; 200) | |||
23 | NAME@[22; 23) | 23 | NAME@[22; 23) |
24 | IDENT@[22; 23) "T" | 24 | IDENT@[22; 23) "T" |
25 | COLON@[23; 24) | 25 | COLON@[23; 24) |
26 | TYPE_BOUND_LIST@[24; 24) | ||
26 | R_ANGLE@[24; 25) | 27 | R_ANGLE@[24; 25) |
27 | SEMI@[25; 26) | 28 | SEMI@[25; 26) |
28 | WHITESPACE@[26; 27) | 29 | WHITESPACE@[26; 27) |
@@ -38,7 +39,9 @@ SOURCE_FILE@[0; 200) | |||
38 | IDENT@[36; 37) "T" | 39 | IDENT@[36; 37) "T" |
39 | COLON@[37; 38) | 40 | COLON@[37; 38) |
40 | WHITESPACE@[38; 39) | 41 | WHITESPACE@[38; 39) |
41 | LIFETIME@[39; 41) "'a" | 42 | TYPE_BOUND_LIST@[39; 41) |
43 | TYPE_BOUND@[39; 41) | ||
44 | LIFETIME@[39; 41) "'a" | ||
42 | R_ANGLE@[41; 42) | 45 | R_ANGLE@[41; 42) |
43 | SEMI@[42; 43) | 46 | SEMI@[42; 43) |
44 | WHITESPACE@[43; 44) | 47 | WHITESPACE@[43; 44) |
@@ -54,9 +57,11 @@ SOURCE_FILE@[0; 200) | |||
54 | IDENT@[53; 54) "T" | 57 | IDENT@[53; 54) "T" |
55 | COLON@[54; 55) | 58 | COLON@[54; 55) |
56 | WHITESPACE@[55; 56) | 59 | WHITESPACE@[55; 56) |
57 | LIFETIME@[56; 58) "'a" | 60 | TYPE_BOUND_LIST@[56; 60) |
58 | WHITESPACE@[58; 59) | 61 | TYPE_BOUND@[56; 58) |
59 | PLUS@[59; 60) | 62 | LIFETIME@[56; 58) "'a" |
63 | WHITESPACE@[58; 59) | ||
64 | PLUS@[59; 60) | ||
60 | WHITESPACE@[60; 61) | 65 | WHITESPACE@[60; 61) |
61 | R_ANGLE@[61; 62) | 66 | R_ANGLE@[61; 62) |
62 | SEMI@[62; 63) | 67 | SEMI@[62; 63) |
@@ -73,11 +78,14 @@ SOURCE_FILE@[0; 200) | |||
73 | IDENT@[73; 74) "T" | 78 | IDENT@[73; 74) "T" |
74 | COLON@[74; 75) | 79 | COLON@[74; 75) |
75 | WHITESPACE@[75; 76) | 80 | WHITESPACE@[75; 76) |
76 | LIFETIME@[76; 78) "'a" | 81 | TYPE_BOUND_LIST@[76; 83) |
77 | WHITESPACE@[78; 79) | 82 | TYPE_BOUND@[76; 78) |
78 | PLUS@[79; 80) | 83 | LIFETIME@[76; 78) "'a" |
79 | WHITESPACE@[80; 81) | 84 | WHITESPACE@[78; 79) |
80 | LIFETIME@[81; 83) "'d" | 85 | PLUS@[79; 80) |
86 | WHITESPACE@[80; 81) | ||
87 | TYPE_BOUND@[81; 83) | ||
88 | LIFETIME@[81; 83) "'d" | ||
81 | WHITESPACE@[83; 84) | 89 | WHITESPACE@[83; 84) |
82 | R_ANGLE@[84; 85) | 90 | R_ANGLE@[84; 85) |
83 | SEMI@[85; 86) | 91 | SEMI@[85; 86) |
@@ -94,19 +102,23 @@ SOURCE_FILE@[0; 200) | |||
94 | IDENT@[96; 97) "T" | 102 | IDENT@[96; 97) "T" |
95 | COLON@[97; 98) | 103 | COLON@[97; 98) |
96 | WHITESPACE@[98; 99) | 104 | WHITESPACE@[98; 99) |
97 | LIFETIME@[99; 101) "'a" | 105 | TYPE_BOUND_LIST@[99; 114) |
98 | WHITESPACE@[101; 102) | 106 | TYPE_BOUND@[99; 101) |
99 | PLUS@[102; 103) | 107 | LIFETIME@[99; 101) "'a" |
100 | WHITESPACE@[103; 104) | 108 | WHITESPACE@[101; 102) |
101 | LIFETIME@[104; 106) "'d" | 109 | PLUS@[102; 103) |
102 | WHITESPACE@[106; 107) | 110 | WHITESPACE@[103; 104) |
103 | PLUS@[107; 108) | 111 | TYPE_BOUND@[104; 106) |
104 | WHITESPACE@[108; 109) | 112 | LIFETIME@[104; 106) "'d" |
105 | PATH_TYPE@[109; 114) | 113 | WHITESPACE@[106; 107) |
106 | PATH@[109; 114) | 114 | PLUS@[107; 108) |
107 | PATH_SEGMENT@[109; 114) | 115 | WHITESPACE@[108; 109) |
108 | NAME_REF@[109; 114) | 116 | TYPE_BOUND@[109; 114) |
109 | IDENT@[109; 114) "Clone" | 117 | PATH_TYPE@[109; 114) |
118 | PATH@[109; 114) | ||
119 | PATH_SEGMENT@[109; 114) | ||
120 | NAME_REF@[109; 114) | ||
121 | IDENT@[109; 114) "Clone" | ||
110 | R_ANGLE@[114; 115) | 122 | R_ANGLE@[114; 115) |
111 | SEMI@[115; 116) | 123 | SEMI@[115; 116) |
112 | WHITESPACE@[116; 117) | 124 | WHITESPACE@[116; 117) |
@@ -122,19 +134,22 @@ SOURCE_FILE@[0; 200) | |||
122 | IDENT@[126; 127) "T" | 134 | IDENT@[126; 127) "T" |
123 | COLON@[127; 128) | 135 | COLON@[127; 128) |
124 | WHITESPACE@[128; 129) | 136 | WHITESPACE@[128; 129) |
125 | PATH_TYPE@[129; 141) | 137 | TYPE_BOUND_LIST@[129; 141) |
126 | PATH@[129; 134) | 138 | TYPE_BOUND@[129; 134) |
127 | PATH_SEGMENT@[129; 134) | 139 | PATH_TYPE@[129; 134) |
128 | NAME_REF@[129; 134) | 140 | PATH@[129; 134) |
129 | IDENT@[129; 134) "Clone" | 141 | PATH_SEGMENT@[129; 134) |
142 | NAME_REF@[129; 134) | ||
143 | IDENT@[129; 134) "Clone" | ||
130 | WHITESPACE@[134; 135) | 144 | WHITESPACE@[134; 135) |
131 | PLUS@[135; 136) | 145 | PLUS@[135; 136) |
132 | WHITESPACE@[136; 137) | 146 | WHITESPACE@[136; 137) |
133 | PATH_TYPE@[137; 141) | 147 | TYPE_BOUND@[137; 141) |
134 | PATH@[137; 141) | 148 | PATH_TYPE@[137; 141) |
135 | PATH_SEGMENT@[137; 141) | 149 | PATH@[137; 141) |
136 | NAME_REF@[137; 141) | 150 | PATH_SEGMENT@[137; 141) |
137 | IDENT@[137; 141) "Copy" | 151 | NAME_REF@[137; 141) |
152 | IDENT@[137; 141) "Copy" | ||
138 | R_ANGLE@[141; 142) | 153 | R_ANGLE@[141; 142) |
139 | SEMI@[142; 143) | 154 | SEMI@[142; 143) |
140 | WHITESPACE@[143; 144) | 155 | WHITESPACE@[143; 144) |
@@ -150,27 +165,31 @@ SOURCE_FILE@[0; 200) | |||
150 | IDENT@[153; 154) "T" | 165 | IDENT@[153; 154) "T" |
151 | COLON@[154; 155) | 166 | COLON@[154; 155) |
152 | WHITESPACE@[155; 156) | 167 | WHITESPACE@[155; 156) |
153 | PATH_TYPE@[156; 178) | 168 | TYPE_BOUND_LIST@[156; 178) |
154 | PATH@[156; 161) | 169 | TYPE_BOUND@[156; 161) |
155 | PATH_SEGMENT@[156; 161) | 170 | PATH_TYPE@[156; 161) |
156 | COLONCOLON@[156; 158) | 171 | PATH@[156; 161) |
157 | NAME_REF@[158; 161) | 172 | PATH_SEGMENT@[156; 161) |
158 | IDENT@[158; 161) "Foo" | 173 | COLONCOLON@[156; 158) |
174 | NAME_REF@[158; 161) | ||
175 | IDENT@[158; 161) "Foo" | ||
159 | WHITESPACE@[161; 162) | 176 | WHITESPACE@[161; 162) |
160 | PLUS@[162; 163) | 177 | PLUS@[162; 163) |
161 | WHITESPACE@[163; 164) | 178 | WHITESPACE@[163; 164) |
162 | PATH_TYPE@[164; 178) | 179 | TYPE_BOUND@[164; 173) |
163 | PATH@[164; 173) | 180 | PATH_TYPE@[164; 173) |
164 | PATH@[164; 168) | 181 | PATH@[164; 173) |
165 | PATH_SEGMENT@[164; 168) | 182 | PATH@[164; 168) |
166 | SELF_KW@[164; 168) | 183 | PATH_SEGMENT@[164; 168) |
167 | COLONCOLON@[168; 170) | 184 | SELF_KW@[164; 168) |
168 | PATH_SEGMENT@[170; 173) | 185 | COLONCOLON@[168; 170) |
169 | NAME_REF@[170; 173) | 186 | PATH_SEGMENT@[170; 173) |
170 | IDENT@[170; 173) "Bar" | 187 | NAME_REF@[170; 173) |
171 | WHITESPACE@[173; 174) | 188 | IDENT@[170; 173) "Bar" |
172 | PLUS@[174; 175) | 189 | WHITESPACE@[173; 174) |
173 | WHITESPACE@[175; 176) | 190 | PLUS@[174; 175) |
191 | WHITESPACE@[175; 176) | ||
192 | TYPE_BOUND@[176; 178) | ||
174 | LIFETIME@[176; 178) "'a" | 193 | LIFETIME@[176; 178) "'a" |
175 | R_ANGLE@[178; 179) | 194 | R_ANGLE@[178; 179) |
176 | SEMI@[179; 180) | 195 | SEMI@[179; 180) |
@@ -186,13 +205,64 @@ SOURCE_FILE@[0; 200) | |||
186 | NAME@[190; 191) | 205 | NAME@[190; 191) |
187 | IDENT@[190; 191) "T" | 206 | IDENT@[190; 191) "T" |
188 | COLON@[191; 192) | 207 | COLON@[191; 192) |
208 | TYPE_BOUND_LIST@[192; 192) | ||
189 | COMMA@[192; 193) | 209 | COMMA@[192; 193) |
190 | WHITESPACE@[193; 194) | 210 | WHITESPACE@[193; 194) |
191 | TYPE_PARAM@[194; 196) | 211 | TYPE_PARAM@[194; 196) |
192 | NAME@[194; 195) | 212 | NAME@[194; 195) |
193 | IDENT@[194; 195) "U" | 213 | IDENT@[194; 195) "U" |
194 | COLON@[195; 196) | 214 | COLON@[195; 196) |
215 | TYPE_BOUND_LIST@[196; 196) | ||
195 | COMMA@[196; 197) | 216 | COMMA@[196; 197) |
196 | R_ANGLE@[197; 198) | 217 | R_ANGLE@[197; 198) |
197 | SEMI@[198; 199) | 218 | SEMI@[198; 199) |
198 | WHITESPACE@[199; 200) | 219 | WHITESPACE@[199; 200) |
220 | STRUCT_DEF@[200; 250) | ||
221 | STRUCT_KW@[200; 206) | ||
222 | WHITESPACE@[206; 207) | ||
223 | NAME@[207; 208) | ||
224 | IDENT@[207; 208) "K" | ||
225 | TYPE_PARAM_LIST@[208; 249) | ||
226 | L_ANGLE@[208; 209) | ||
227 | LIFETIME_PARAM@[209; 215) | ||
228 | LIFETIME@[209; 211) "'a" | ||
229 | COLON@[211; 212) | ||
230 | WHITESPACE@[212; 213) | ||
231 | LIFETIME@[213; 215) "'d" | ||
232 | COMMA@[215; 216) | ||
233 | WHITESPACE@[216; 217) | ||
234 | LIFETIME_PARAM@[217; 228) | ||
235 | LIFETIME@[217; 219) "'d" | ||
236 | COLON@[219; 220) | ||
237 | WHITESPACE@[220; 221) | ||
238 | LIFETIME@[221; 223) "'a" | ||
239 | WHITESPACE@[223; 224) | ||
240 | PLUS@[224; 225) | ||
241 | WHITESPACE@[225; 226) | ||
242 | LIFETIME@[226; 228) "'b" | ||
243 | COMMA@[228; 229) | ||
244 | WHITESPACE@[229; 230) | ||
245 | TYPE_PARAM@[230; 248) | ||
246 | NAME@[230; 231) | ||
247 | IDENT@[230; 231) "T" | ||
248 | COLON@[231; 232) | ||
249 | WHITESPACE@[232; 233) | ||
250 | TYPE_BOUND_LIST@[233; 248) | ||
251 | TYPE_BOUND@[233; 235) | ||
252 | LIFETIME@[233; 235) "'a" | ||
253 | WHITESPACE@[235; 236) | ||
254 | PLUS@[236; 237) | ||
255 | WHITESPACE@[237; 238) | ||
256 | TYPE_BOUND@[238; 240) | ||
257 | LIFETIME@[238; 240) "'d" | ||
258 | WHITESPACE@[240; 241) | ||
259 | PLUS@[241; 242) | ||
260 | WHITESPACE@[242; 243) | ||
261 | TYPE_BOUND@[243; 248) | ||
262 | PATH_TYPE@[243; 248) | ||
263 | PATH@[243; 248) | ||
264 | PATH_SEGMENT@[243; 248) | ||
265 | NAME_REF@[243; 248) | ||
266 | IDENT@[243; 248) "Clone" | ||
267 | R_ANGLE@[248; 249) | ||
268 | SEMI@[249; 250) | ||
diff --git a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt b/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt index 150a9e483..7236d9e62 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0032_where_for.txt | |||
@@ -25,43 +25,48 @@ SOURCE_FILE@[0; 116) | |||
25 | IDENT@[39; 42) "SER" | 25 | IDENT@[39; 42) "SER" |
26 | COLON@[42; 43) | 26 | COLON@[42; 43) |
27 | WHITESPACE@[43; 44) | 27 | WHITESPACE@[43; 44) |
28 | PATH_TYPE@[44; 111) | 28 | TYPE_BOUND_LIST@[44; 111) |
29 | PATH@[44; 53) | 29 | TYPE_BOUND@[44; 53) |
30 | PATH_SEGMENT@[44; 53) | 30 | PATH_TYPE@[44; 53) |
31 | NAME_REF@[44; 53) | 31 | PATH@[44; 53) |
32 | IDENT@[44; 53) "Serialize" | 32 | PATH_SEGMENT@[44; 53) |
33 | NAME_REF@[44; 53) | ||
34 | IDENT@[44; 53) "Serialize" | ||
33 | WHITESPACE@[53; 54) | 35 | WHITESPACE@[53; 54) |
34 | PLUS@[54; 55) | 36 | PLUS@[54; 55) |
35 | WHITESPACE@[55; 56) | 37 | WHITESPACE@[55; 56) |
36 | FOR_TYPE@[56; 81) | 38 | TYPE_BOUND@[56; 81) |
37 | FOR_KW@[56; 59) | 39 | FOR_TYPE@[56; 81) |
38 | TYPE_PARAM_LIST@[59; 64) | 40 | FOR_KW@[56; 59) |
39 | L_ANGLE@[59; 60) | 41 | TYPE_PARAM_LIST@[59; 64) |
40 | LIFETIME_PARAM@[60; 63) | 42 | L_ANGLE@[59; 60) |
41 | LIFETIME@[60; 63) "'de" | 43 | LIFETIME_PARAM@[60; 63) |
42 | R_ANGLE@[63; 64) | 44 | LIFETIME@[60; 63) "'de" |
43 | WHITESPACE@[64; 65) | 45 | R_ANGLE@[63; 64) |
44 | PATH_TYPE@[65; 81) | 46 | WHITESPACE@[64; 65) |
45 | PATH@[65; 81) | 47 | PATH_TYPE@[65; 81) |
46 | PATH_SEGMENT@[65; 81) | 48 | PATH@[65; 81) |
47 | NAME_REF@[65; 76) | 49 | PATH_SEGMENT@[65; 81) |
48 | IDENT@[65; 76) "Deserialize" | 50 | NAME_REF@[65; 76) |
49 | TYPE_ARG_LIST@[76; 81) | 51 | IDENT@[65; 76) "Deserialize" |
50 | L_ANGLE@[76; 77) | 52 | TYPE_ARG_LIST@[76; 81) |
51 | LIFETIME_ARG@[77; 80) | 53 | L_ANGLE@[76; 77) |
52 | LIFETIME@[77; 80) "'de" | 54 | LIFETIME_ARG@[77; 80) |
53 | R_ANGLE@[80; 81) | 55 | LIFETIME@[77; 80) "'de" |
56 | R_ANGLE@[80; 81) | ||
54 | WHITESPACE@[81; 82) | 57 | WHITESPACE@[81; 82) |
55 | PLUS@[82; 83) | 58 | PLUS@[82; 83) |
56 | WHITESPACE@[83; 84) | 59 | WHITESPACE@[83; 84) |
57 | PATH_TYPE@[84; 111) | 60 | TYPE_BOUND@[84; 93) |
58 | PATH@[84; 93) | 61 | PATH_TYPE@[84; 93) |
59 | PATH_SEGMENT@[84; 93) | 62 | PATH@[84; 93) |
60 | NAME_REF@[84; 93) | 63 | PATH_SEGMENT@[84; 93) |
61 | IDENT@[84; 93) "PartialEq" | 64 | NAME_REF@[84; 93) |
62 | WHITESPACE@[93; 94) | 65 | IDENT@[84; 93) "PartialEq" |
63 | PLUS@[94; 95) | 66 | WHITESPACE@[93; 94) |
64 | WHITESPACE@[95; 96) | 67 | PLUS@[94; 95) |
68 | WHITESPACE@[95; 96) | ||
69 | TYPE_BOUND@[96; 111) | ||
65 | PATH_TYPE@[96; 111) | 70 | PATH_TYPE@[96; 111) |
66 | PATH@[96; 111) | 71 | PATH@[96; 111) |
67 | PATH@[96; 104) | 72 | PATH@[96; 104) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt b/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt index f3987c3b7..580baaac5 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0035_weird_exprs.txt | |||
@@ -1694,21 +1694,23 @@ SOURCE_FILE@[0; 3813) | |||
1694 | IMPL_TRAIT_TYPE@[3063; 3083) | 1694 | IMPL_TRAIT_TYPE@[3063; 3083) |
1695 | IMPL_KW@[3063; 3067) | 1695 | IMPL_KW@[3063; 3067) |
1696 | WHITESPACE@[3067; 3068) | 1696 | WHITESPACE@[3067; 3068) |
1697 | PATH_TYPE@[3068; 3083) | 1697 | TYPE_BOUND_LIST@[3068; 3083) |
1698 | PATH@[3068; 3083) | 1698 | TYPE_BOUND@[3068; 3083) |
1699 | PATH@[3068; 3076) | 1699 | PATH_TYPE@[3068; 3083) |
1700 | PATH@[3068; 3071) | 1700 | PATH@[3068; 3083) |
1701 | PATH_SEGMENT@[3068; 3071) | 1701 | PATH@[3068; 3076) |
1702 | NAME_REF@[3068; 3071) | 1702 | PATH@[3068; 3071) |
1703 | IDENT@[3068; 3071) "std" | 1703 | PATH_SEGMENT@[3068; 3071) |
1704 | COLONCOLON@[3071; 3073) | 1704 | NAME_REF@[3068; 3071) |
1705 | PATH_SEGMENT@[3073; 3076) | 1705 | IDENT@[3068; 3071) "std" |
1706 | NAME_REF@[3073; 3076) | 1706 | COLONCOLON@[3071; 3073) |
1707 | IDENT@[3073; 3076) "fmt" | 1707 | PATH_SEGMENT@[3073; 3076) |
1708 | COLONCOLON@[3076; 3078) | 1708 | NAME_REF@[3073; 3076) |
1709 | PATH_SEGMENT@[3078; 3083) | 1709 | IDENT@[3073; 3076) "fmt" |
1710 | NAME_REF@[3078; 3083) | 1710 | COLONCOLON@[3076; 3078) |
1711 | IDENT@[3078; 3083) "Debug" | 1711 | PATH_SEGMENT@[3078; 3083) |
1712 | NAME_REF@[3078; 3083) | ||
1713 | IDENT@[3078; 3083) "Debug" | ||
1712 | WHITESPACE@[3083; 3084) | 1714 | WHITESPACE@[3083; 3084) |
1713 | BLOCK@[3084; 3514) | 1715 | BLOCK@[3084; 3514) |
1714 | L_CURLY@[3084; 3085) | 1716 | L_CURLY@[3084; 3085) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt index 208e5e51c..93e26aaf6 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0036_fully_qualified.txt | |||
@@ -16,11 +16,13 @@ SOURCE_FILE@[0; 157) | |||
16 | IDENT@[73; 74) "S" | 16 | IDENT@[73; 74) "S" |
17 | COLON@[74; 75) | 17 | COLON@[74; 75) |
18 | WHITESPACE@[75; 76) | 18 | WHITESPACE@[75; 76) |
19 | PATH_TYPE@[76; 84) | 19 | TYPE_BOUND_LIST@[76; 84) |
20 | PATH@[76; 84) | 20 | TYPE_BOUND@[76; 84) |
21 | PATH_SEGMENT@[76; 84) | 21 | PATH_TYPE@[76; 84) |
22 | NAME_REF@[76; 84) | 22 | PATH@[76; 84) |
23 | IDENT@[76; 84) "Iterator" | 23 | PATH_SEGMENT@[76; 84) |
24 | NAME_REF@[76; 84) | ||
25 | IDENT@[76; 84) "Iterator" | ||
24 | R_ANGLE@[84; 85) | 26 | R_ANGLE@[84; 85) |
25 | PARAM_LIST@[85; 87) | 27 | PARAM_LIST@[85; 87) |
26 | L_PAREN@[85; 86) | 28 | L_PAREN@[85; 86) |
@@ -64,11 +66,13 @@ SOURCE_FILE@[0; 157) | |||
64 | IDENT@[125; 129) "Item" | 66 | IDENT@[125; 129) "Item" |
65 | COLON@[129; 130) | 67 | COLON@[129; 130) |
66 | WHITESPACE@[130; 131) | 68 | WHITESPACE@[130; 131) |
67 | PATH_TYPE@[131; 133) | 69 | TYPE_BOUND_LIST@[131; 133) |
68 | PATH@[131; 133) | 70 | TYPE_BOUND@[131; 133) |
69 | PATH_SEGMENT@[131; 133) | 71 | PATH_TYPE@[131; 133) |
70 | NAME_REF@[131; 133) | 72 | PATH@[131; 133) |
71 | IDENT@[131; 133) "Eq" | 73 | PATH_SEGMENT@[131; 133) |
74 | NAME_REF@[131; 133) | ||
75 | IDENT@[131; 133) "Eq" | ||
72 | COMMA@[133; 134) | 76 | COMMA@[133; 134) |
73 | WHITESPACE@[134; 135) | 77 | WHITESPACE@[134; 135) |
74 | BLOCK@[135; 156) | 78 | BLOCK@[135; 156) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt b/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt index 4842e9b90..fe3fca5cd 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0038_where_pred_type.txt | |||
@@ -29,11 +29,13 @@ SOURCE_FILE@[0; 34) | |||
29 | R_PAREN@[25; 26) | 29 | R_PAREN@[25; 26) |
30 | COLON@[26; 27) | 30 | COLON@[26; 27) |
31 | WHITESPACE@[27; 28) | 31 | WHITESPACE@[27; 28) |
32 | PATH_TYPE@[28; 31) | 32 | TYPE_BOUND_LIST@[28; 31) |
33 | PATH@[28; 31) | 33 | TYPE_BOUND@[28; 31) |
34 | PATH_SEGMENT@[28; 31) | 34 | PATH_TYPE@[28; 31) |
35 | NAME_REF@[28; 31) | 35 | PATH@[28; 31) |
36 | IDENT@[28; 31) "Foo" | 36 | PATH_SEGMENT@[28; 31) |
37 | NAME_REF@[28; 31) | ||
38 | IDENT@[28; 31) "Foo" | ||
37 | WHITESPACE@[31; 32) | 39 | WHITESPACE@[31; 32) |
38 | BLOCK@[32; 34) | 40 | BLOCK@[32; 34) |
39 | L_CURLY@[32; 33) | 41 | L_CURLY@[32; 33) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt b/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt index a1ba645ef..eba587f18 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0045_block_inner_attrs.txt | |||
@@ -116,32 +116,34 @@ SOURCE_FILE@[0; 686) | |||
116 | IMPL_TRAIT_TYPE@[576; 600) | 116 | IMPL_TRAIT_TYPE@[576; 600) |
117 | IMPL_KW@[576; 580) | 117 | IMPL_KW@[576; 580) |
118 | WHITESPACE@[580; 581) | 118 | WHITESPACE@[580; 581) |
119 | PATH_TYPE@[581; 600) | 119 | TYPE_BOUND_LIST@[581; 600) |
120 | PATH@[581; 600) | 120 | TYPE_BOUND@[581; 600) |
121 | PATH_SEGMENT@[581; 600) | 121 | PATH_TYPE@[581; 600) |
122 | NAME_REF@[581; 583) | 122 | PATH@[581; 600) |
123 | IDENT@[581; 583) "Fn" | 123 | PATH_SEGMENT@[581; 600) |
124 | PARAM_LIST@[583; 585) | 124 | NAME_REF@[581; 583) |
125 | L_PAREN@[583; 584) | 125 | IDENT@[581; 583) "Fn" |
126 | R_PAREN@[584; 585) | 126 | PARAM_LIST@[583; 585) |
127 | WHITESPACE@[585; 586) | 127 | L_PAREN@[583; 584) |
128 | RET_TYPE@[586; 600) | 128 | R_PAREN@[584; 585) |
129 | THIN_ARROW@[586; 588) | 129 | WHITESPACE@[585; 586) |
130 | WHITESPACE@[588; 589) | 130 | RET_TYPE@[586; 600) |
131 | PATH_TYPE@[589; 600) | 131 | THIN_ARROW@[586; 588) |
132 | PATH@[589; 600) | 132 | WHITESPACE@[588; 589) |
133 | PATH_SEGMENT@[589; 600) | 133 | PATH_TYPE@[589; 600) |
134 | NAME_REF@[589; 594) | 134 | PATH@[589; 600) |
135 | IDENT@[589; 594) "Event" | 135 | PATH_SEGMENT@[589; 600) |
136 | TYPE_ARG_LIST@[594; 600) | 136 | NAME_REF@[589; 594) |
137 | L_ANGLE@[594; 595) | 137 | IDENT@[589; 594) "Event" |
138 | TYPE_ARG@[595; 599) | 138 | TYPE_ARG_LIST@[594; 600) |
139 | PATH_TYPE@[595; 599) | 139 | L_ANGLE@[594; 595) |
140 | PATH@[595; 599) | 140 | TYPE_ARG@[595; 599) |
141 | PATH_SEGMENT@[595; 599) | 141 | PATH_TYPE@[595; 599) |
142 | NAME_REF@[595; 599) | 142 | PATH@[595; 599) |
143 | IDENT@[595; 599) "Self" | 143 | PATH_SEGMENT@[595; 599) |
144 | R_ANGLE@[599; 600) | 144 | NAME_REF@[595; 599) |
145 | IDENT@[595; 599) "Self" | ||
146 | R_ANGLE@[599; 600) | ||
145 | R_PAREN@[600; 601) | 147 | R_PAREN@[600; 601) |
146 | WHITESPACE@[601; 602) | 148 | WHITESPACE@[601; 602) |
147 | BLOCK@[602; 683) | 149 | BLOCK@[602; 683) |