diff options
Diffstat (limited to 'crates/syntax')
38 files changed, 422 insertions, 180 deletions
diff --git a/crates/syntax/src/ast.rs b/crates/syntax/src/ast.rs index 7844f9ed6..83de067d9 100644 --- a/crates/syntax/src/ast.rs +++ b/crates/syntax/src/ast.rs | |||
@@ -19,8 +19,8 @@ pub use self::{ | |||
19 | expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp}, | 19 | expr_ext::{ArrayExprKind, BinOp, Effect, ElseBranch, LiteralKind, PrefixOp, RangeOp}, |
20 | generated::{nodes::*, tokens::*}, | 20 | generated::{nodes::*, tokens::*}, |
21 | node_ext::{ | 21 | node_ext::{ |
22 | AttrKind, FieldKind, NameOrNameRef, PathSegmentKind, SelfParamKind, SlicePatComponents, | 22 | AttrKind, FieldKind, Macro, NameOrNameRef, PathSegmentKind, SelfParamKind, |
23 | StructKind, TypeBoundKind, VisibilityKind, | 23 | SlicePatComponents, StructKind, TypeBoundKind, VisibilityKind, |
24 | }, | 24 | }, |
25 | token_ext::*, | 25 | token_ext::*, |
26 | traits::*, | 26 | traits::*, |
@@ -311,7 +311,7 @@ where | |||
311 | let pred = predicates.next().unwrap(); | 311 | let pred = predicates.next().unwrap(); |
312 | let mut bounds = pred.type_bound_list().unwrap().bounds(); | 312 | let mut bounds = pred.type_bound_list().unwrap().bounds(); |
313 | 313 | ||
314 | assert_eq!("'a", pred.lifetime_token().unwrap().text()); | 314 | assert_eq!("'a", pred.lifetime().unwrap().lifetime_ident_token().unwrap().text()); |
315 | 315 | ||
316 | assert_bound("'b", bounds.next()); | 316 | assert_bound("'b", bounds.next()); |
317 | assert_bound("'c", bounds.next()); | 317 | assert_bound("'c", bounds.next()); |
diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs index 0ad75214f..1588ba93e 100644 --- a/crates/syntax/src/ast/generated/nodes.rs +++ b/crates/syntax/src/ast/generated/nodes.rs | |||
@@ -20,6 +20,15 @@ impl NameRef { | |||
20 | pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) } | 20 | pub fn ident_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![ident]) } |
21 | } | 21 | } |
22 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 22 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
23 | pub struct Lifetime { | ||
24 | pub(crate) syntax: SyntaxNode, | ||
25 | } | ||
26 | impl Lifetime { | ||
27 | pub fn lifetime_ident_token(&self) -> Option<SyntaxToken> { | ||
28 | support::token(&self.syntax, T![lifetime_ident]) | ||
29 | } | ||
30 | } | ||
31 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
23 | pub struct Path { | 32 | pub struct Path { |
24 | pub(crate) syntax: SyntaxNode, | 33 | pub(crate) syntax: SyntaxNode, |
25 | } | 34 | } |
@@ -105,9 +114,7 @@ pub struct LifetimeArg { | |||
105 | pub(crate) syntax: SyntaxNode, | 114 | pub(crate) syntax: SyntaxNode, |
106 | } | 115 | } |
107 | impl LifetimeArg { | 116 | impl LifetimeArg { |
108 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 117 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
109 | support::token(&self.syntax, T![lifetime]) | ||
110 | } | ||
111 | } | 118 | } |
112 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 119 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
113 | pub struct ConstArg { | 120 | pub struct ConstArg { |
@@ -286,6 +293,18 @@ impl MacroRules { | |||
286 | pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } | 293 | pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) } |
287 | } | 294 | } |
288 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 295 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
296 | pub struct MacroDef { | ||
297 | pub(crate) syntax: SyntaxNode, | ||
298 | } | ||
299 | impl ast::AttrsOwner for MacroDef {} | ||
300 | impl ast::NameOwner for MacroDef {} | ||
301 | impl ast::VisibilityOwner for MacroDef {} | ||
302 | impl MacroDef { | ||
303 | pub fn macro_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![macro]) } | ||
304 | pub fn args(&self) -> Option<TokenTree> { support::child(&self.syntax) } | ||
305 | pub fn body(&self) -> Option<TokenTree> { support::child(&self.syntax) } | ||
306 | } | ||
307 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | ||
289 | pub struct Module { | 308 | pub struct Module { |
290 | pub(crate) syntax: SyntaxNode, | 309 | pub(crate) syntax: SyntaxNode, |
291 | } | 310 | } |
@@ -475,9 +494,7 @@ pub struct SelfParam { | |||
475 | impl ast::AttrsOwner for SelfParam {} | 494 | impl ast::AttrsOwner for SelfParam {} |
476 | impl SelfParam { | 495 | impl SelfParam { |
477 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } | 496 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } |
478 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 497 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
479 | support::token(&self.syntax, T![lifetime]) | ||
480 | } | ||
481 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 498 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
482 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } | 499 | pub fn self_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![self]) } |
483 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } | 500 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
@@ -593,9 +610,7 @@ pub struct LifetimeParam { | |||
593 | impl ast::AttrsOwner for LifetimeParam {} | 610 | impl ast::AttrsOwner for LifetimeParam {} |
594 | impl ast::TypeBoundsOwner for LifetimeParam {} | 611 | impl ast::TypeBoundsOwner for LifetimeParam {} |
595 | impl LifetimeParam { | 612 | impl LifetimeParam { |
596 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 613 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
597 | support::token(&self.syntax, T![lifetime]) | ||
598 | } | ||
599 | } | 614 | } |
600 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 615 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
601 | pub struct TypeParam { | 616 | pub struct TypeParam { |
@@ -616,9 +631,7 @@ impl ast::TypeBoundsOwner for WherePred {} | |||
616 | impl WherePred { | 631 | impl WherePred { |
617 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } | 632 | pub fn for_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![for]) } |
618 | pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) } | 633 | pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) } |
619 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 634 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
620 | support::token(&self.syntax, T![lifetime]) | ||
621 | } | ||
622 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } | 635 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } |
623 | } | 636 | } |
624 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 637 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -694,9 +707,7 @@ pub struct BreakExpr { | |||
694 | impl ast::AttrsOwner for BreakExpr {} | 707 | impl ast::AttrsOwner for BreakExpr {} |
695 | impl BreakExpr { | 708 | impl BreakExpr { |
696 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) } | 709 | pub fn break_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![break]) } |
697 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 710 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
698 | support::token(&self.syntax, T![lifetime]) | ||
699 | } | ||
700 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } | 711 | pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } |
701 | } | 712 | } |
702 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 713 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -740,9 +751,7 @@ impl ContinueExpr { | |||
740 | pub fn continue_token(&self) -> Option<SyntaxToken> { | 751 | pub fn continue_token(&self) -> Option<SyntaxToken> { |
741 | support::token(&self.syntax, T![continue]) | 752 | support::token(&self.syntax, T![continue]) |
742 | } | 753 | } |
743 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 754 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
744 | support::token(&self.syntax, T![lifetime]) | ||
745 | } | ||
746 | } | 755 | } |
747 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 756 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
748 | pub struct EffectExpr { | 757 | pub struct EffectExpr { |
@@ -925,9 +934,8 @@ pub struct Label { | |||
925 | pub(crate) syntax: SyntaxNode, | 934 | pub(crate) syntax: SyntaxNode, |
926 | } | 935 | } |
927 | impl Label { | 936 | impl Label { |
928 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 937 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
929 | support::token(&self.syntax, T![lifetime]) | 938 | pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } |
930 | } | ||
931 | } | 939 | } |
932 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 940 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
933 | pub struct RecordExprFieldList { | 941 | pub struct RecordExprFieldList { |
@@ -1088,9 +1096,7 @@ pub struct RefType { | |||
1088 | } | 1096 | } |
1089 | impl RefType { | 1097 | impl RefType { |
1090 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } | 1098 | pub fn amp_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![&]) } |
1091 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 1099 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
1092 | support::token(&self.syntax, T![lifetime]) | ||
1093 | } | ||
1094 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } | 1100 | pub fn mut_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![mut]) } |
1095 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } | 1101 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } |
1096 | } | 1102 | } |
@@ -1117,9 +1123,7 @@ pub struct TypeBound { | |||
1117 | pub(crate) syntax: SyntaxNode, | 1123 | pub(crate) syntax: SyntaxNode, |
1118 | } | 1124 | } |
1119 | impl TypeBound { | 1125 | impl TypeBound { |
1120 | pub fn lifetime_token(&self) -> Option<SyntaxToken> { | 1126 | pub fn lifetime(&self) -> Option<Lifetime> { support::child(&self.syntax) } |
1121 | support::token(&self.syntax, T![lifetime]) | ||
1122 | } | ||
1123 | pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) } | 1127 | pub fn question_mark_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![?]) } |
1124 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } | 1128 | pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) } |
1125 | } | 1129 | } |
@@ -1332,6 +1336,7 @@ pub enum Item { | |||
1332 | Impl(Impl), | 1336 | Impl(Impl), |
1333 | MacroCall(MacroCall), | 1337 | MacroCall(MacroCall), |
1334 | MacroRules(MacroRules), | 1338 | MacroRules(MacroRules), |
1339 | MacroDef(MacroDef), | ||
1335 | Module(Module), | 1340 | Module(Module), |
1336 | Static(Static), | 1341 | Static(Static), |
1337 | Struct(Struct), | 1342 | Struct(Struct), |
@@ -1425,6 +1430,17 @@ impl AstNode for NameRef { | |||
1425 | } | 1430 | } |
1426 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1431 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1427 | } | 1432 | } |
1433 | impl AstNode for Lifetime { | ||
1434 | fn can_cast(kind: SyntaxKind) -> bool { kind == LIFETIME } | ||
1435 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1436 | if Self::can_cast(syntax.kind()) { | ||
1437 | Some(Self { syntax }) | ||
1438 | } else { | ||
1439 | None | ||
1440 | } | ||
1441 | } | ||
1442 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1443 | } | ||
1428 | impl AstNode for Path { | 1444 | impl AstNode for Path { |
1429 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH } | 1445 | fn can_cast(kind: SyntaxKind) -> bool { kind == PATH } |
1430 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1446 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -1689,6 +1705,17 @@ impl AstNode for MacroRules { | |||
1689 | } | 1705 | } |
1690 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 1706 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
1691 | } | 1707 | } |
1708 | impl AstNode for MacroDef { | ||
1709 | fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF } | ||
1710 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
1711 | if Self::can_cast(syntax.kind()) { | ||
1712 | Some(Self { syntax }) | ||
1713 | } else { | ||
1714 | None | ||
1715 | } | ||
1716 | } | ||
1717 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | ||
1718 | } | ||
1692 | impl AstNode for Module { | 1719 | impl AstNode for Module { |
1693 | fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE } | 1720 | fn can_cast(kind: SyntaxKind) -> bool { kind == MODULE } |
1694 | fn cast(syntax: SyntaxNode) -> Option<Self> { | 1721 | fn cast(syntax: SyntaxNode) -> Option<Self> { |
@@ -3086,6 +3113,9 @@ impl From<MacroCall> for Item { | |||
3086 | impl From<MacroRules> for Item { | 3113 | impl From<MacroRules> for Item { |
3087 | fn from(node: MacroRules) -> Item { Item::MacroRules(node) } | 3114 | fn from(node: MacroRules) -> Item { Item::MacroRules(node) } |
3088 | } | 3115 | } |
3116 | impl From<MacroDef> for Item { | ||
3117 | fn from(node: MacroDef) -> Item { Item::MacroDef(node) } | ||
3118 | } | ||
3089 | impl From<Module> for Item { | 3119 | impl From<Module> for Item { |
3090 | fn from(node: Module) -> Item { Item::Module(node) } | 3120 | fn from(node: Module) -> Item { Item::Module(node) } |
3091 | } | 3121 | } |
@@ -3111,7 +3141,7 @@ impl AstNode for Item { | |||
3111 | fn can_cast(kind: SyntaxKind) -> bool { | 3141 | fn can_cast(kind: SyntaxKind) -> bool { |
3112 | match kind { | 3142 | match kind { |
3113 | CONST | ENUM | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL | MACRO_CALL | MACRO_RULES | 3143 | CONST | ENUM | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL | MACRO_CALL | MACRO_RULES |
3114 | | MODULE | STATIC | STRUCT | TRAIT | TYPE_ALIAS | UNION | USE => true, | 3144 | | MACRO_DEF | MODULE | STATIC | STRUCT | TRAIT | TYPE_ALIAS | UNION | USE => true, |
3115 | _ => false, | 3145 | _ => false, |
3116 | } | 3146 | } |
3117 | } | 3147 | } |
@@ -3125,6 +3155,7 @@ impl AstNode for Item { | |||
3125 | IMPL => Item::Impl(Impl { syntax }), | 3155 | IMPL => Item::Impl(Impl { syntax }), |
3126 | MACRO_CALL => Item::MacroCall(MacroCall { syntax }), | 3156 | MACRO_CALL => Item::MacroCall(MacroCall { syntax }), |
3127 | MACRO_RULES => Item::MacroRules(MacroRules { syntax }), | 3157 | MACRO_RULES => Item::MacroRules(MacroRules { syntax }), |
3158 | MACRO_DEF => Item::MacroDef(MacroDef { syntax }), | ||
3128 | MODULE => Item::Module(Module { syntax }), | 3159 | MODULE => Item::Module(Module { syntax }), |
3129 | STATIC => Item::Static(Static { syntax }), | 3160 | STATIC => Item::Static(Static { syntax }), |
3130 | STRUCT => Item::Struct(Struct { syntax }), | 3161 | STRUCT => Item::Struct(Struct { syntax }), |
@@ -3146,6 +3177,7 @@ impl AstNode for Item { | |||
3146 | Item::Impl(it) => &it.syntax, | 3177 | Item::Impl(it) => &it.syntax, |
3147 | Item::MacroCall(it) => &it.syntax, | 3178 | Item::MacroCall(it) => &it.syntax, |
3148 | Item::MacroRules(it) => &it.syntax, | 3179 | Item::MacroRules(it) => &it.syntax, |
3180 | Item::MacroDef(it) => &it.syntax, | ||
3149 | Item::Module(it) => &it.syntax, | 3181 | Item::Module(it) => &it.syntax, |
3150 | Item::Static(it) => &it.syntax, | 3182 | Item::Static(it) => &it.syntax, |
3151 | Item::Struct(it) => &it.syntax, | 3183 | Item::Struct(it) => &it.syntax, |
@@ -3495,6 +3527,11 @@ impl std::fmt::Display for NameRef { | |||
3495 | std::fmt::Display::fmt(self.syntax(), f) | 3527 | std::fmt::Display::fmt(self.syntax(), f) |
3496 | } | 3528 | } |
3497 | } | 3529 | } |
3530 | impl std::fmt::Display for Lifetime { | ||
3531 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3532 | std::fmt::Display::fmt(self.syntax(), f) | ||
3533 | } | ||
3534 | } | ||
3498 | impl std::fmt::Display for Path { | 3535 | impl std::fmt::Display for Path { |
3499 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3536 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3500 | std::fmt::Display::fmt(self.syntax(), f) | 3537 | std::fmt::Display::fmt(self.syntax(), f) |
@@ -3615,6 +3652,11 @@ impl std::fmt::Display for MacroRules { | |||
3615 | std::fmt::Display::fmt(self.syntax(), f) | 3652 | std::fmt::Display::fmt(self.syntax(), f) |
3616 | } | 3653 | } |
3617 | } | 3654 | } |
3655 | impl std::fmt::Display for MacroDef { | ||
3656 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
3657 | std::fmt::Display::fmt(self.syntax(), f) | ||
3658 | } | ||
3659 | } | ||
3618 | impl std::fmt::Display for Module { | 3660 | impl std::fmt::Display for Module { |
3619 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | 3661 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
3620 | std::fmt::Display::fmt(self.syntax(), f) | 3662 | std::fmt::Display::fmt(self.syntax(), f) |
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index c59a29eab..c45cb514a 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | use std::fmt; | 4 | use std::fmt; |
5 | 5 | ||
6 | use ast::AttrsOwner; | ||
6 | use itertools::Itertools; | 7 | use itertools::Itertools; |
7 | use parser::SyntaxKind; | 8 | use parser::SyntaxKind; |
8 | 9 | ||
@@ -11,6 +12,12 @@ use crate::{ | |||
11 | SmolStr, SyntaxElement, SyntaxToken, T, | 12 | SmolStr, SyntaxElement, SyntaxToken, T, |
12 | }; | 13 | }; |
13 | 14 | ||
15 | impl ast::Lifetime { | ||
16 | pub fn text(&self) -> &SmolStr { | ||
17 | text_of_first_token(self.syntax()) | ||
18 | } | ||
19 | } | ||
20 | |||
14 | impl ast::Name { | 21 | impl ast::Name { |
15 | pub fn text(&self) -> &SmolStr { | 22 | pub fn text(&self) -> &SmolStr { |
16 | text_of_first_token(self.syntax()) | 23 | text_of_first_token(self.syntax()) |
@@ -31,6 +38,57 @@ fn text_of_first_token(node: &SyntaxNode) -> &SmolStr { | |||
31 | node.green().children().next().and_then(|it| it.into_token()).unwrap().text() | 38 | node.green().children().next().and_then(|it| it.into_token()).unwrap().text() |
32 | } | 39 | } |
33 | 40 | ||
41 | pub enum Macro { | ||
42 | MacroRules(ast::MacroRules), | ||
43 | MacroDef(ast::MacroDef), | ||
44 | } | ||
45 | |||
46 | impl From<ast::MacroRules> for Macro { | ||
47 | fn from(it: ast::MacroRules) -> Self { | ||
48 | Macro::MacroRules(it) | ||
49 | } | ||
50 | } | ||
51 | |||
52 | impl From<ast::MacroDef> for Macro { | ||
53 | fn from(it: ast::MacroDef) -> Self { | ||
54 | Macro::MacroDef(it) | ||
55 | } | ||
56 | } | ||
57 | |||
58 | impl AstNode for Macro { | ||
59 | fn can_cast(kind: SyntaxKind) -> bool { | ||
60 | match kind { | ||
61 | SyntaxKind::MACRO_RULES | SyntaxKind::MACRO_DEF => true, | ||
62 | _ => false, | ||
63 | } | ||
64 | } | ||
65 | fn cast(syntax: SyntaxNode) -> Option<Self> { | ||
66 | let res = match syntax.kind() { | ||
67 | SyntaxKind::MACRO_RULES => Macro::MacroRules(ast::MacroRules { syntax }), | ||
68 | SyntaxKind::MACRO_DEF => Macro::MacroDef(ast::MacroDef { syntax }), | ||
69 | _ => return None, | ||
70 | }; | ||
71 | Some(res) | ||
72 | } | ||
73 | fn syntax(&self) -> &SyntaxNode { | ||
74 | match self { | ||
75 | Macro::MacroRules(it) => it.syntax(), | ||
76 | Macro::MacroDef(it) => it.syntax(), | ||
77 | } | ||
78 | } | ||
79 | } | ||
80 | |||
81 | impl NameOwner for Macro { | ||
82 | fn name(&self) -> Option<ast::Name> { | ||
83 | match self { | ||
84 | Macro::MacroRules(mac) => mac.name(), | ||
85 | Macro::MacroDef(mac) => mac.name(), | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | |||
90 | impl AttrsOwner for Macro {} | ||
91 | |||
34 | #[derive(Debug, Clone, PartialEq, Eq)] | 92 | #[derive(Debug, Clone, PartialEq, Eq)] |
35 | pub enum AttrKind { | 93 | pub enum AttrKind { |
36 | Inner, | 94 | Inner, |
@@ -341,7 +399,7 @@ pub enum TypeBoundKind { | |||
341 | /// for<'a> ... | 399 | /// for<'a> ... |
342 | ForType(ast::ForType), | 400 | ForType(ast::ForType), |
343 | /// 'a | 401 | /// 'a |
344 | Lifetime(SyntaxToken), | 402 | Lifetime(ast::Lifetime), |
345 | } | 403 | } |
346 | 404 | ||
347 | impl ast::TypeBound { | 405 | impl ast::TypeBound { |
@@ -350,7 +408,7 @@ impl ast::TypeBound { | |||
350 | TypeBoundKind::PathType(path_type) | 408 | TypeBoundKind::PathType(path_type) |
351 | } else if let Some(for_type) = support::children(self.syntax()).next() { | 409 | } else if let Some(for_type) = support::children(self.syntax()).next() { |
352 | TypeBoundKind::ForType(for_type) | 410 | TypeBoundKind::ForType(for_type) |
353 | } else if let Some(lifetime) = self.lifetime_token() { | 411 | } else if let Some(lifetime) = self.lifetime() { |
354 | TypeBoundKind::Lifetime(lifetime) | 412 | TypeBoundKind::Lifetime(lifetime) |
355 | } else { | 413 | } else { |
356 | unreachable!() | 414 | unreachable!() |
@@ -388,7 +446,7 @@ impl ast::LifetimeParam { | |||
388 | .children_with_tokens() | 446 | .children_with_tokens() |
389 | .filter_map(|it| it.into_token()) | 447 | .filter_map(|it| it.into_token()) |
390 | .skip_while(|x| x.kind() != T![:]) | 448 | .skip_while(|x| x.kind() != T![:]) |
391 | .filter(|it| it.kind() == T![lifetime]) | 449 | .filter(|it| it.kind() == T![lifetime_ident]) |
392 | } | 450 | } |
393 | } | 451 | } |
394 | 452 | ||
@@ -462,4 +520,6 @@ impl ast::DocCommentsOwner for ast::Const {} | |||
462 | impl ast::DocCommentsOwner for ast::TypeAlias {} | 520 | impl ast::DocCommentsOwner for ast::TypeAlias {} |
463 | impl ast::DocCommentsOwner for ast::Impl {} | 521 | impl ast::DocCommentsOwner for ast::Impl {} |
464 | impl ast::DocCommentsOwner for ast::MacroRules {} | 522 | impl ast::DocCommentsOwner for ast::MacroRules {} |
523 | impl ast::DocCommentsOwner for ast::MacroDef {} | ||
524 | impl ast::DocCommentsOwner for ast::Macro {} | ||
465 | impl ast::DocCommentsOwner for ast::Use {} | 525 | impl ast::DocCommentsOwner for ast::Use {} |
diff --git a/crates/syntax/src/display.rs b/crates/syntax/src/display.rs index d33bde30c..391647fc6 100644 --- a/crates/syntax/src/display.rs +++ b/crates/syntax/src/display.rs | |||
@@ -76,8 +76,20 @@ pub fn type_label(node: &ast::TypeAlias) -> String { | |||
76 | label.trim().to_owned() | 76 | label.trim().to_owned() |
77 | } | 77 | } |
78 | 78 | ||
79 | pub fn macro_label(node: &ast::MacroRules) -> String { | 79 | pub fn macro_label(node: &ast::Macro) -> String { |
80 | let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default(); | 80 | let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default(); |
81 | let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" }; | 81 | match node { |
82 | format!("{}macro_rules! {}", vis, name) | 82 | ast::Macro::MacroRules(node) => { |
83 | let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" }; | ||
84 | format!("{}macro_rules! {}", vis, name) | ||
85 | } | ||
86 | ast::Macro::MacroDef(node) => { | ||
87 | let mut s = String::new(); | ||
88 | if let Some(vis) = node.visibility() { | ||
89 | format_to!(s, "{} ", vis); | ||
90 | } | ||
91 | format_to!(s, "macro {}", name); | ||
92 | s | ||
93 | } | ||
94 | } | ||
83 | } | 95 | } |
diff --git a/crates/syntax/src/parsing/lexer.rs b/crates/syntax/src/parsing/lexer.rs index 8afd7e53b..0cbba73c5 100644 --- a/crates/syntax/src/parsing/lexer.rs +++ b/crates/syntax/src/parsing/lexer.rs | |||
@@ -146,9 +146,9 @@ fn rustc_token_kind_to_syntax_kind( | |||
146 | rustc_lexer::TokenKind::RawIdent => IDENT, | 146 | rustc_lexer::TokenKind::RawIdent => IDENT, |
147 | rustc_lexer::TokenKind::Literal { kind, .. } => return match_literal_kind(&kind), | 147 | rustc_lexer::TokenKind::Literal { kind, .. } => return match_literal_kind(&kind), |
148 | 148 | ||
149 | rustc_lexer::TokenKind::Lifetime { starts_with_number: false } => LIFETIME, | 149 | rustc_lexer::TokenKind::Lifetime { starts_with_number: false } => LIFETIME_IDENT, |
150 | rustc_lexer::TokenKind::Lifetime { starts_with_number: true } => { | 150 | rustc_lexer::TokenKind::Lifetime { starts_with_number: true } => { |
151 | return (LIFETIME, Some("Lifetime name cannot start with a number")) | 151 | return (LIFETIME_IDENT, Some("Lifetime name cannot start with a number")) |
152 | } | 152 | } |
153 | 153 | ||
154 | rustc_lexer::TokenKind::Semi => T![;], | 154 | rustc_lexer::TokenKind::Semi => T![;], |
diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs index a7698a404..a7698a404 100644 --- a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.rs +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.rs | |||
diff --git a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt index e138bcebc..11e0ae14a 100644 --- a/crates/syntax/test_data/lexer/err/0057_lifetime_strarts_with_a_number.txt +++ b/crates/syntax/test_data/lexer/err/0057_lifetime_starts_with_a_number.txt | |||
@@ -1,6 +1,6 @@ | |||
1 | LIFETIME 2 "\'1" | 1 | LIFETIME_IDENT 2 "\'1" |
2 | WHITESPACE 1 "\n" | 2 | WHITESPACE 1 "\n" |
3 | LIFETIME 10 "\'1lifetime" | 3 | LIFETIME_IDENT 10 "\'1lifetime" |
4 | WHITESPACE 1 "\n" | 4 | WHITESPACE 1 "\n" |
5 | > error0..2 token("\'1") msg(Lifetime name cannot start with a number) | 5 | > error0..2 token("\'1") msg(Lifetime name cannot start with a number) |
6 | > error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) | 6 | > error3..13 token("\'1lifetime") msg(Lifetime name cannot start with a number) |
diff --git a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt index 005c29100..4d6625c3a 100644 --- a/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt +++ b/crates/syntax/test_data/lexer/ok/0007_lifetimes.txt | |||
@@ -1,8 +1,8 @@ | |||
1 | LIFETIME 2 "\'a" | 1 | LIFETIME_IDENT 2 "\'a" |
2 | WHITESPACE 1 " " | 2 | WHITESPACE 1 " " |
3 | LIFETIME 4 "\'foo" | 3 | LIFETIME_IDENT 4 "\'foo" |
4 | WHITESPACE 1 " " | 4 | WHITESPACE 1 " " |
5 | LIFETIME 12 "\'foo_bar_baz" | 5 | LIFETIME_IDENT 12 "\'foo_bar_baz" |
6 | WHITESPACE 1 " " | 6 | WHITESPACE 1 " " |
7 | LIFETIME 2 "\'_" | 7 | LIFETIME_IDENT 2 "\'_" |
8 | WHITESPACE 1 "\n" | 8 | WHITESPACE 1 "\n" |
diff --git a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast index e3be6b22e..4c4ddf5ec 100644 --- a/crates/syntax/test_data/parser/err/0024_many_type_parens.rast +++ b/crates/syntax/test_data/parser/err/0024_many_type_parens.rast | |||
@@ -42,7 +42,8 @@ [email protected] | |||
42 | [email protected] | 42 | [email protected] |
43 | [email protected] "<" | 43 | [email protected] "<" |
44 | [email protected] | 44 | [email protected] |
45 | [email protected] "\'a" | 45 | [email protected] |
46 | [email protected] "\'a" | ||
46 | [email protected] ">" | 47 | [email protected] ">" |
47 | [email protected] " " | 48 | [email protected] " " |
48 | [email protected] | 49 | [email protected] |
@@ -53,7 +54,8 @@ [email protected] | |||
53 | [email protected] | 54 | [email protected] |
54 | [email protected] "<" | 55 | [email protected] "<" |
55 | [email protected] | 56 | [email protected] |
56 | [email protected] "\'a" | 57 | [email protected] |
58 | [email protected] "\'a" | ||
57 | [email protected] ">" | 59 | [email protected] ">" |
58 | [email protected] ")" | 60 | [email protected] ")" |
59 | [email protected] ">" | 61 | [email protected] ">" |
@@ -125,7 +127,8 @@ [email protected] | |||
125 | [email protected] | 127 | [email protected] |
126 | [email protected] "<" | 128 | [email protected] "<" |
127 | [email protected] | 129 | [email protected] |
128 | [email protected] "\'a" | 130 | [email protected] |
131 | [email protected] "\'a" | ||
129 | [email protected] ">" | 132 | [email protected] ">" |
130 | [email protected] " " | 133 | [email protected] " " |
131 | [email protected] | 134 | [email protected] |
@@ -136,7 +139,8 @@ [email protected] | |||
136 | [email protected] | 139 | [email protected] |
137 | [email protected] "<" | 140 | [email protected] "<" |
138 | [email protected] | 141 | [email protected] |
139 | [email protected] "\'a" | 142 | [email protected] |
143 | [email protected] "\'a" | ||
140 | [email protected] ">" | 144 | [email protected] ">" |
141 | [email protected] ")" | 145 | [email protected] ")" |
142 | [email protected] | 146 | [email protected] |
@@ -187,7 +191,7 @@ [email protected] | |||
187 | [email protected] | 191 | [email protected] |
188 | [email protected] "<" | 192 | [email protected] "<" |
189 | [email protected] | 193 | [email protected] |
190 | [email protected] "\'a" | 194 | LIFETIME_IDENT@155..157 "\'a" |
191 | [email protected] ">" | 195 | [email protected] ">" |
192 | [email protected] " " | 196 | [email protected] " " |
193 | [email protected] | 197 | [email protected] |
@@ -201,7 +205,7 @@ [email protected] | |||
201 | [email protected] "Trait" | 205 | [email protected] "Trait" |
202 | [email protected] "<" | 206 | [email protected] "<" |
203 | [email protected] | 207 | [email protected] |
204 | [email protected] "\'a" | 208 | LIFETIME_IDENT@165..167 "\'a" |
205 | [email protected] ">" | 209 | [email protected] ">" |
206 | [email protected] | 210 | [email protected] |
207 | [email protected] ")" | 211 | [email protected] ")" |
@@ -245,7 +249,8 @@ [email protected] | |||
245 | [email protected] | 249 | [email protected] |
246 | [email protected] "<" | 250 | [email protected] "<" |
247 | [email protected] | 251 | [email protected] |
248 | [email protected] "\'a" | 252 | [email protected] |
253 | [email protected] "\'a" | ||
249 | [email protected] ">" | 254 | [email protected] ">" |
250 | [email protected] " " | 255 | [email protected] " " |
251 | [email protected] | 256 | [email protected] |
@@ -256,7 +261,8 @@ [email protected] | |||
256 | [email protected] | 261 | [email protected] |
257 | [email protected] "<" | 262 | [email protected] "<" |
258 | [email protected] | 263 | [email protected] |
259 | [email protected] "\'a" | 264 | [email protected] |
265 | [email protected] "\'a" | ||
260 | [email protected] ">" | 266 | [email protected] ">" |
261 | [email protected] ")" | 267 | [email protected] ")" |
262 | [email protected] " " | 268 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast index a8e42e6ea..c5215d6b1 100644 --- a/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast +++ b/crates/syntax/test_data/parser/err/0027_incomplere_where_for.rast | |||
@@ -16,7 +16,8 @@ [email protected] | |||
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "<" | 17 | [email protected] "<" |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "\'a" | 19 | [email protected] |
20 | [email protected] "\'a" | ||
20 | [email protected] ">" | 21 | [email protected] ">" |
21 | [email protected] "\n" | 22 | [email protected] "\n" |
22 | [email protected] | 23 | [email protected] |
diff --git a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast index df29017e7..e73bd1aea 100644 --- a/crates/syntax/test_data/parser/err/0043_weird_blocks.rast +++ b/crates/syntax/test_data/parser/err/0043_weird_blocks.rast | |||
@@ -54,7 +54,8 @@ [email protected] | |||
54 | [email protected] | 54 | [email protected] |
55 | [email protected] | 55 | [email protected] |
56 | [email protected] | 56 | [email protected] |
57 | [email protected] "\'label" | 57 | [email protected] |
58 | [email protected] "\'label" | ||
58 | [email protected] ":" | 59 | [email protected] ":" |
59 | [email protected] " " | 60 | [email protected] " " |
60 | [email protected] | 61 | [email protected] |
diff --git a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast index 71aa86494..cc54185e5 100644 --- a/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast +++ b/crates/syntax/test_data/parser/err/0044_unexpected_for_type.rast | |||
@@ -12,12 +12,14 @@ [email protected] | |||
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "<" | 13 | [email protected] "<" |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "\'a" | 15 | [email protected] |
16 | [email protected] "\'a" | ||
16 | [email protected] ">" | 17 | [email protected] ">" |
17 | [email protected] " " | 18 | [email protected] " " |
18 | [email protected] | 19 | [email protected] |
19 | [email protected] "&" | 20 | [email protected] "&" |
20 | [email protected] "\'a" | 21 | [email protected] |
22 | [email protected] "\'a" | ||
21 | [email protected] " " | 23 | [email protected] " " |
22 | [email protected] | 24 | [email protected] |
23 | [email protected] | 25 | [email protected] |
@@ -39,14 +41,16 @@ [email protected] | |||
39 | [email protected] | 41 | [email protected] |
40 | [email protected] "<" | 42 | [email protected] "<" |
41 | [email protected] | 43 | [email protected] |
42 | [email protected] "\'a" | 44 | [email protected] |
45 | [email protected] "\'a" | ||
43 | [email protected] ">" | 46 | [email protected] ">" |
44 | [email protected] " " | 47 | [email protected] " " |
45 | [email protected] | 48 | [email protected] |
46 | [email protected] "(" | 49 | [email protected] "(" |
47 | [email protected] | 50 | [email protected] |
48 | [email protected] "&" | 51 | [email protected] "&" |
49 | [email protected] "\'a" | 52 | [email protected] |
53 | [email protected] "\'a" | ||
50 | [email protected] " " | 54 | [email protected] " " |
51 | [email protected] | 55 | [email protected] |
52 | [email protected] | 56 | [email protected] |
@@ -70,7 +74,8 @@ [email protected] | |||
70 | [email protected] | 74 | [email protected] |
71 | [email protected] "<" | 75 | [email protected] "<" |
72 | [email protected] | 76 | [email protected] |
73 | [email protected] "\'a" | 77 | [email protected] |
78 | [email protected] "\'a" | ||
74 | [email protected] ">" | 79 | [email protected] ">" |
75 | [email protected] " " | 80 | [email protected] " " |
76 | [email protected] | 81 | [email protected] |
@@ -96,7 +101,8 @@ [email protected] | |||
96 | [email protected] | 101 | [email protected] |
97 | [email protected] "<" | 102 | [email protected] "<" |
98 | [email protected] | 103 | [email protected] |
99 | [email protected] "\'a" | 104 | [email protected] |
105 | [email protected] "\'a" | ||
100 | [email protected] ">" | 106 | [email protected] ">" |
101 | [email protected] " " | 107 | [email protected] " " |
102 | [email protected] | 108 | [email protected] |
@@ -104,7 +110,8 @@ [email protected] | |||
104 | [email protected] | 110 | [email protected] |
105 | [email protected] "<" | 111 | [email protected] "<" |
106 | [email protected] | 112 | [email protected] |
107 | [email protected] "\'b" | 113 | [email protected] |
114 | [email protected] "\'b" | ||
108 | [email protected] ">" | 115 | [email protected] ">" |
109 | [email protected] " " | 116 | [email protected] " " |
110 | [email protected] | 117 | [email protected] |
@@ -114,7 +121,8 @@ [email protected] | |||
114 | [email protected] | 121 | [email protected] |
115 | [email protected] | 122 | [email protected] |
116 | [email protected] "&" | 123 | [email protected] "&" |
117 | [email protected] "\'a" | 124 | [email protected] |
125 | [email protected] "\'a" | ||
118 | [email protected] " " | 126 | [email protected] " " |
119 | [email protected] | 127 | [email protected] |
120 | [email protected] | 128 | [email protected] |
@@ -126,7 +134,8 @@ [email protected] | |||
126 | [email protected] | 134 | [email protected] |
127 | [email protected] | 135 | [email protected] |
128 | [email protected] "&" | 136 | [email protected] "&" |
129 | [email protected] "\'b" | 137 | [email protected] |
138 | [email protected] "\'b" | ||
130 | [email protected] " " | 139 | [email protected] " " |
131 | [email protected] | 140 | [email protected] |
132 | [email protected] | 141 | [email protected] |
@@ -159,7 +168,8 @@ [email protected] | |||
159 | [email protected] | 168 | [email protected] |
160 | [email protected] "<" | 169 | [email protected] "<" |
161 | [email protected] | 170 | [email protected] |
162 | [email protected] "\'a" | 171 | [email protected] |
172 | [email protected] "\'a" | ||
163 | [email protected] ">" | 173 | [email protected] ">" |
164 | [email protected] " " | 174 | [email protected] " " |
165 | [email protected] | 175 | [email protected] |
@@ -167,7 +177,8 @@ [email protected] | |||
167 | [email protected] | 177 | [email protected] |
168 | [email protected] "<" | 178 | [email protected] "<" |
169 | [email protected] | 179 | [email protected] |
170 | [email protected] "\'b" | 180 | [email protected] |
181 | [email protected] "\'b" | ||
171 | [email protected] ">" | 182 | [email protected] ">" |
172 | [email protected] " " | 183 | [email protected] " " |
173 | [email protected] | 184 | [email protected] |
@@ -175,7 +186,8 @@ [email protected] | |||
175 | [email protected] | 186 | [email protected] |
176 | [email protected] "<" | 187 | [email protected] "<" |
177 | [email protected] | 188 | [email protected] |
178 | [email protected] "\'c" | 189 | [email protected] |
190 | [email protected] "\'c" | ||
179 | [email protected] ">" | 191 | [email protected] ">" |
180 | [email protected] " " | 192 | [email protected] " " |
181 | [email protected] | 193 | [email protected] |
@@ -185,7 +197,8 @@ [email protected] | |||
185 | [email protected] | 197 | [email protected] |
186 | [email protected] | 198 | [email protected] |
187 | [email protected] "&" | 199 | [email protected] "&" |
188 | [email protected] "\'a" | 200 | [email protected] |
201 | [email protected] "\'a" | ||
189 | [email protected] " " | 202 | [email protected] " " |
190 | [email protected] | 203 | [email protected] |
191 | [email protected] | 204 | [email protected] |
@@ -197,7 +210,8 @@ [email protected] | |||
197 | [email protected] | 210 | [email protected] |
198 | [email protected] | 211 | [email protected] |
199 | [email protected] "&" | 212 | [email protected] "&" |
200 | [email protected] "\'b" | 213 | [email protected] |
214 | [email protected] "\'b" | ||
201 | [email protected] " " | 215 | [email protected] " " |
202 | [email protected] | 216 | [email protected] |
203 | [email protected] | 217 | [email protected] |
@@ -209,7 +223,8 @@ [email protected] | |||
209 | [email protected] | 223 | [email protected] |
210 | [email protected] | 224 | [email protected] |
211 | [email protected] "&" | 225 | [email protected] "&" |
212 | [email protected] "\'c" | 226 | [email protected] |
227 | [email protected] "\'c" | ||
213 | [email protected] " " | 228 | [email protected] " " |
214 | [email protected] | 229 | [email protected] |
215 | [email protected] | 230 | [email protected] |
diff --git a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast index 592741cdb..7049f4734 100644 --- a/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast +++ b/crates/syntax/test_data/parser/err/0046_ambiguous_trait_object.rast | |||
@@ -7,14 +7,16 @@ [email protected] | |||
7 | [email protected] | 7 | [email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "\'a" | 10 | [email protected] |
11 | [email protected] "\'a" | ||
11 | [email protected] ">" | 12 | [email protected] ">" |
12 | [email protected] " " | 13 | [email protected] " " |
13 | [email protected] "=" | 14 | [email protected] "=" |
14 | [email protected] " " | 15 | [email protected] " " |
15 | [email protected] | 16 | [email protected] |
16 | [email protected] "&" | 17 | [email protected] "&" |
17 | [email protected] "\'a" | 18 | [email protected] |
19 | [email protected] "\'a" | ||
18 | [email protected] " " | 20 | [email protected] " " |
19 | [email protected] | 21 | [email protected] |
20 | [email protected] "dyn" | 22 | [email protected] "dyn" |
@@ -101,7 +103,8 @@ [email protected] | |||
101 | [email protected] "+" | 103 | [email protected] "+" |
102 | [email protected] " " | 104 | [email protected] " " |
103 | [email protected] | 105 | [email protected] |
104 | [email protected] "\'static" | 106 | [email protected] |
107 | [email protected] "\'static" | ||
105 | [email protected] ";" | 108 | [email protected] ";" |
106 | [email protected] "\n" | 109 | [email protected] "\n" |
107 | [email protected] | 110 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast index a4271fc87..0adf2cd5a 100644 --- a/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast +++ b/crates/syntax/test_data/parser/inline/err/0002_misplaced_label_err.rast | |||
@@ -14,7 +14,8 @@ [email protected] | |||
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "\'loop" | 17 | [email protected] |
18 | [email protected] "\'loop" | ||
18 | [email protected] ":" | 19 | [email protected] ":" |
19 | [email protected] " " | 20 | [email protected] " " |
20 | [email protected] | 21 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast index 62da7b887..6cdfd058b 100644 --- a/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast +++ b/crates/syntax/test_data/parser/inline/ok/0003_where_pred_for.rast | |||
@@ -22,7 +22,8 @@ [email protected] | |||
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "<" | 23 | [email protected] "<" |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "\'a" | 25 | [email protected] |
26 | [email protected] "\'a" | ||
26 | [email protected] ">" | 27 | [email protected] ">" |
27 | [email protected] " " | 28 | [email protected] " " |
28 | [email protected] | 29 | [email protected] |
@@ -44,7 +45,8 @@ [email protected] | |||
44 | [email protected] | 45 | [email protected] |
45 | [email protected] | 46 | [email protected] |
46 | [email protected] "&" | 47 | [email protected] "&" |
47 | [email protected] "\'a" | 48 | [email protected] |
49 | [email protected] "\'a" | ||
48 | [email protected] " " | 50 | [email protected] " " |
49 | [email protected] | 51 | [email protected] |
50 | [email protected] | 52 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast index d24ad7423..8048f5fad 100644 --- a/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast +++ b/crates/syntax/test_data/parser/inline/ok/0006_self_param.rast | |||
@@ -52,7 +52,8 @@ [email protected] | |||
52 | [email protected] "(" | 52 | [email protected] "(" |
53 | [email protected] | 53 | [email protected] |
54 | [email protected] "&" | 54 | [email protected] "&" |
55 | [email protected] "\'a" | 55 | [email protected] |
56 | [email protected] "\'a" | ||
56 | [email protected] " " | 57 | [email protected] " " |
57 | [email protected] "self" | 58 | [email protected] "self" |
58 | [email protected] "," | 59 | [email protected] "," |
@@ -71,7 +72,8 @@ [email protected] | |||
71 | [email protected] "(" | 72 | [email protected] "(" |
72 | [email protected] | 73 | [email protected] |
73 | [email protected] "&" | 74 | [email protected] "&" |
74 | [email protected] "\'a" | 75 | [email protected] |
76 | [email protected] "\'a" | ||
75 | [email protected] " " | 77 | [email protected] " " |
76 | [email protected] "mut" | 78 | [email protected] "mut" |
77 | [email protected] " " | 79 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast index e95688f56..075b438d2 100644 --- a/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0007_type_param_bounds.rast | |||
@@ -13,7 +13,8 @@ [email protected] | |||
13 | [email protected] " " | 13 | [email protected] " " |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] "\'a" | 16 | [email protected] |
17 | [email protected] "\'a" | ||
17 | [email protected] " " | 18 | [email protected] " " |
18 | [email protected] "+" | 19 | [email protected] "+" |
19 | [email protected] " " | 20 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast index 104e153ce..b9e92b57a 100644 --- a/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0015_continue_expr.rast | |||
@@ -26,7 +26,8 @@ [email protected] | |||
26 | [email protected] | 26 | [email protected] |
27 | [email protected] "continue" | 27 | [email protected] "continue" |
28 | [email protected] " " | 28 | [email protected] " " |
29 | [email protected] "\'l" | 29 | [email protected] |
30 | [email protected] "\'l" | ||
30 | [email protected] ";" | 31 | [email protected] ";" |
31 | [email protected] "\n " | 32 | [email protected] "\n " |
32 | [email protected] "}" | 33 | [email protected] "}" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast index 32b2959bd..dad4362b7 100644 --- a/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast | |||
@@ -31,13 +31,15 @@ [email protected] | |||
31 | [email protected] | 31 | [email protected] |
32 | [email protected] "<" | 32 | [email protected] "<" |
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "\'a" | 34 | [email protected] |
35 | [email protected] "\'a" | ||
35 | [email protected] ">" | 36 | [email protected] ">" |
36 | [email protected] ">" | 37 | [email protected] ">" |
37 | [email protected] " " | 38 | [email protected] " " |
38 | [email protected] "+" | 39 | [email protected] "+" |
39 | [email protected] " " | 40 | [email protected] " " |
40 | [email protected] | 41 | [email protected] |
41 | [email protected] "\'a" | 42 | [email protected] |
43 | [email protected] "\'a" | ||
42 | [email protected] ";" | 44 | [email protected] ";" |
43 | [email protected] "\n" | 45 | [email protected] "\n" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast index 974df9f9a..ac0299268 100644 --- a/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast +++ b/crates/syntax/test_data/parser/inline/ok/0033_reference_type;.rast | |||
@@ -24,7 +24,8 @@ [email protected] | |||
24 | [email protected] " " | 24 | [email protected] " " |
25 | [email protected] | 25 | [email protected] |
26 | [email protected] "&" | 26 | [email protected] "&" |
27 | [email protected] "\'static" | 27 | [email protected] |
28 | [email protected] "\'static" | ||
28 | [email protected] " " | 29 | [email protected] " " |
29 | [email protected] | 30 | [email protected] |
30 | [email protected] "(" | 31 | [email protected] "(" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast index f905def6f..828013d45 100644 --- a/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast +++ b/crates/syntax/test_data/parser/inline/ok/0034_break_expr.rast | |||
@@ -26,7 +26,8 @@ [email protected] | |||
26 | [email protected] | 26 | [email protected] |
27 | [email protected] "break" | 27 | [email protected] "break" |
28 | [email protected] " " | 28 | [email protected] " " |
29 | [email protected] "\'l" | 29 | [email protected] |
30 | [email protected] "\'l" | ||
30 | [email protected] ";" | 31 | [email protected] ";" |
31 | [email protected] "\n " | 32 | [email protected] "\n " |
32 | [email protected] | 33 | [email protected] |
@@ -41,7 +42,8 @@ [email protected] | |||
41 | [email protected] | 42 | [email protected] |
42 | [email protected] "break" | 43 | [email protected] "break" |
43 | [email protected] " " | 44 | [email protected] " " |
44 | [email protected] "\'l" | 45 | [email protected] |
46 | [email protected] "\'l" | ||
45 | [email protected] " " | 47 | [email protected] " " |
46 | [email protected] | 48 | [email protected] |
47 | [email protected] "92" | 49 | [email protected] "92" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast index 69e98b9d6..51e881a8e 100644 --- a/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast +++ b/crates/syntax/test_data/parser/inline/ok/0039_type_arg.rast | |||
@@ -15,7 +15,8 @@ [email protected] | |||
15 | [email protected] | 15 | [email protected] |
16 | [email protected] "<" | 16 | [email protected] "<" |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] "\'static" | 18 | [email protected] |
19 | [email protected] "\'static" | ||
19 | [email protected] "," | 20 | [email protected] "," |
20 | [email protected] " " | 21 | [email protected] " " |
21 | [email protected] | 22 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast index 6baea6e3c..b6f5a5689 100644 --- a/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast +++ b/crates/syntax/test_data/parser/inline/ok/0045_param_list_opt_patterns.rast | |||
@@ -33,7 +33,8 @@ [email protected] | |||
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "<" | 34 | [email protected] "<" |
35 | [email protected] | 35 | [email protected] |
36 | [email protected] "\'a" | 36 | [email protected] |
37 | [email protected] "\'a" | ||
37 | [email protected] ">" | 38 | [email protected] ">" |
38 | [email protected] ")" | 39 | [email protected] ")" |
39 | [email protected] ">" | 40 | [email protected] ">" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast index 4d8404e7c..7df6e190a 100644 --- a/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast +++ b/crates/syntax/test_data/parser/inline/ok/0048_path_type_with_bounds.rast | |||
@@ -31,7 +31,8 @@ [email protected] | |||
31 | [email protected] "+" | 31 | [email protected] "+" |
32 | [email protected] " " | 32 | [email protected] " " |
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "\'f" | 34 | [email protected] |
35 | [email protected] "\'f" | ||
35 | [email protected] ">" | 36 | [email protected] ">" |
36 | [email protected] " " | 37 | [email protected] " " |
37 | [email protected] | 38 | [email protected] |
@@ -72,7 +73,8 @@ [email protected] | |||
72 | [email protected] "+" | 73 | [email protected] "+" |
73 | [email protected] " " | 74 | [email protected] " " |
74 | [email protected] | 75 | [email protected] |
75 | [email protected] "\'f" | 76 | [email protected] |
77 | [email protected] "\'f" | ||
76 | [email protected] ">" | 78 | [email protected] ">" |
77 | [email protected] " " | 79 | [email protected] " " |
78 | [email protected] | 80 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast index 28129c50c..61dea413d 100644 --- a/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast +++ b/crates/syntax/test_data/parser/inline/ok/0056_where_clause.rast | |||
@@ -12,17 +12,20 @@ [email protected] | |||
12 | [email protected] "where" | 12 | [email protected] "where" |
13 | [email protected] "\n " | 13 | [email protected] "\n " |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "\'a" | 15 | [email protected] |
16 | [email protected] "\'a" | ||
16 | [email protected] ":" | 17 | [email protected] ":" |
17 | [email protected] " " | 18 | [email protected] " " |
18 | [email protected] | 19 | [email protected] |
19 | [email protected] | 20 | [email protected] |
20 | [email protected] "\'b" | 21 | [email protected] |
22 | [email protected] "\'b" | ||
21 | [email protected] " " | 23 | [email protected] " " |
22 | [email protected] "+" | 24 | [email protected] "+" |
23 | [email protected] " " | 25 | [email protected] " " |
24 | [email protected] | 26 | [email protected] |
25 | [email protected] "\'c" | 27 | [email protected] |
28 | [email protected] "\'c" | ||
26 | [email protected] "," | 29 | [email protected] "," |
27 | [email protected] "\n " | 30 | [email protected] "\n " |
28 | [email protected] | 31 | [email protected] |
@@ -53,7 +56,8 @@ [email protected] | |||
53 | [email protected] "+" | 56 | [email protected] "+" |
54 | [email protected] " " | 57 | [email protected] " " |
55 | [email protected] | 58 | [email protected] |
56 | [email protected] "\'static" | 59 | [email protected] |
60 | [email protected] "\'static" | ||
57 | [email protected] "," | 61 | [email protected] "," |
58 | [email protected] "\n " | 62 | [email protected] "\n " |
59 | [email protected] | 63 | [email protected] |
@@ -71,7 +75,8 @@ [email protected] | |||
71 | [email protected] " " | 75 | [email protected] " " |
72 | [email protected] | 76 | [email protected] |
73 | [email protected] | 77 | [email protected] |
74 | [email protected] "\'a" | 78 | [email protected] |
79 | [email protected] "\'a" | ||
75 | [email protected] "," | 80 | [email protected] "," |
76 | [email protected] "\n " | 81 | [email protected] "\n " |
77 | [email protected] | 82 | [email protected] |
@@ -102,7 +107,8 @@ [email protected] | |||
102 | [email protected] " " | 107 | [email protected] " " |
103 | [email protected] | 108 | [email protected] |
104 | [email protected] | 109 | [email protected] |
105 | [email protected] "\'a" | 110 | [email protected] |
111 | [email protected] "\'a" | ||
106 | [email protected] "\n" | 112 | [email protected] "\n" |
107 | [email protected] | 113 | [email protected] |
108 | [email protected] "{" | 114 | [email protected] "{" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast index 3a7fcfe24..49d26cef4 100644 --- a/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast | |||
@@ -31,13 +31,15 @@ [email protected] | |||
31 | [email protected] | 31 | [email protected] |
32 | [email protected] "<" | 32 | [email protected] "<" |
33 | [email protected] | 33 | [email protected] |
34 | [email protected] "\'a" | 34 | [email protected] |
35 | [email protected] "\'a" | ||
35 | [email protected] ">" | 36 | [email protected] ">" |
36 | [email protected] ">" | 37 | [email protected] ">" |
37 | [email protected] " " | 38 | [email protected] " " |
38 | [email protected] "+" | 39 | [email protected] "+" |
39 | [email protected] " " | 40 | [email protected] " " |
40 | [email protected] | 41 | [email protected] |
41 | [email protected] "\'a" | 42 | [email protected] |
43 | [email protected] "\'a" | ||
42 | [email protected] ";" | 44 | [email protected] ";" |
43 | [email protected] "\n" | 45 | [email protected] "\n" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast index f319d5141..8c909b5af 100644 --- a/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast +++ b/crates/syntax/test_data/parser/inline/ok/0081_for_type.rast | |||
@@ -12,7 +12,8 @@ [email protected] | |||
12 | [email protected] | 12 | [email protected] |
13 | [email protected] "<" | 13 | [email protected] "<" |
14 | [email protected] | 14 | [email protected] |
15 | [email protected] "\'a" | 15 | [email protected] |
16 | [email protected] "\'a" | ||
16 | [email protected] ">" | 17 | [email protected] ">" |
17 | [email protected] " " | 18 | [email protected] " " |
18 | [email protected] | 19 | [email protected] |
@@ -42,7 +43,8 @@ [email protected] | |||
42 | [email protected] | 43 | [email protected] |
43 | [email protected] "<" | 44 | [email protected] "<" |
44 | [email protected] | 45 | [email protected] |
45 | [email protected] "\'a" | 46 | [email protected] |
47 | [email protected] "\'a" | ||
46 | [email protected] ">" | 48 | [email protected] ">" |
47 | [email protected] " " | 49 | [email protected] " " |
48 | [email protected] | 50 | [email protected] |
@@ -59,7 +61,8 @@ [email protected] | |||
59 | [email protected] | 61 | [email protected] |
60 | [email protected] | 62 | [email protected] |
61 | [email protected] "&" | 63 | [email protected] "&" |
62 | [email protected] "\'a" | 64 | [email protected] |
65 | [email protected] "\'a" | ||
63 | [email protected] " " | 66 | [email protected] " " |
64 | [email protected] | 67 | [email protected] |
65 | [email protected] "(" | 68 | [email protected] "(" |
@@ -87,7 +90,8 @@ [email protected] | |||
87 | [email protected] | 90 | [email protected] |
88 | [email protected] "<" | 91 | [email protected] "<" |
89 | [email protected] | 92 | [email protected] |
90 | [email protected] "\'a" | 93 | [email protected] |
94 | [email protected] "\'a" | ||
91 | [email protected] ">" | 95 | [email protected] ">" |
92 | [email protected] " " | 96 | [email protected] " " |
93 | [email protected] | 97 | [email protected] |
@@ -100,7 +104,8 @@ [email protected] | |||
100 | [email protected] | 104 | [email protected] |
101 | [email protected] | 105 | [email protected] |
102 | [email protected] "&" | 106 | [email protected] "&" |
103 | [email protected] "\'a" | 107 | [email protected] |
108 | [email protected] "\'a" | ||
104 | [email protected] " " | 109 | [email protected] " " |
105 | [email protected] | 110 | [email protected] |
106 | [email protected] | 111 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0109_label.rast b/crates/syntax/test_data/parser/inline/ok/0109_label.rast index c9588025c..860dfe608 100644 --- a/crates/syntax/test_data/parser/inline/ok/0109_label.rast +++ b/crates/syntax/test_data/parser/inline/ok/0109_label.rast | |||
@@ -14,7 +14,8 @@ [email protected] | |||
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "\'a" | 17 | [email protected] |
18 | [email protected] "\'a" | ||
18 | [email protected] ":" | 19 | [email protected] ":" |
19 | [email protected] " " | 20 | [email protected] " " |
20 | [email protected] "loop" | 21 | [email protected] "loop" |
@@ -26,7 +27,8 @@ [email protected] | |||
26 | [email protected] | 27 | [email protected] |
27 | [email protected] | 28 | [email protected] |
28 | [email protected] | 29 | [email protected] |
29 | [email protected] "\'b" | 30 | [email protected] |
31 | [email protected] "\'b" | ||
30 | [email protected] ":" | 32 | [email protected] ":" |
31 | [email protected] " " | 33 | [email protected] " " |
32 | [email protected] "while" | 34 | [email protected] "while" |
@@ -41,7 +43,8 @@ [email protected] | |||
41 | [email protected] "\n " | 43 | [email protected] "\n " |
42 | [email protected] | 44 | [email protected] |
43 | [email protected] | 45 | [email protected] |
44 | [email protected] "\'c" | 46 | [email protected] |
47 | [email protected] "\'c" | ||
45 | [email protected] ":" | 48 | [email protected] ":" |
46 | [email protected] " " | 49 | [email protected] " " |
47 | [email protected] "for" | 50 | [email protected] "for" |
diff --git a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast index 570b95205..616aa984e 100644 --- a/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast +++ b/crates/syntax/test_data/parser/inline/ok/0122_generic_lifetime_type_attribute.rast | |||
@@ -20,7 +20,8 @@ [email protected] | |||
20 | [email protected] ")" | 20 | [email protected] ")" |
21 | [email protected] "]" | 21 | [email protected] "]" |
22 | [email protected] " " | 22 | [email protected] " " |
23 | [email protected] "\'a" | 23 | [email protected] |
24 | [email protected] "\'a" | ||
24 | [email protected] "," | 25 | [email protected] "," |
25 | [email protected] " " | 26 | [email protected] " " |
26 | [email protected] | 27 | [email protected] |
@@ -49,7 +50,8 @@ [email protected] | |||
49 | [email protected] " " | 50 | [email protected] " " |
50 | [email protected] | 51 | [email protected] |
51 | [email protected] "&" | 52 | [email protected] "&" |
52 | [email protected] "\'a" | 53 | [email protected] |
54 | [email protected] "\'a" | ||
53 | [email protected] " " | 55 | [email protected] " " |
54 | [email protected] | 56 | [email protected] |
55 | [email protected] | 57 | [email protected] |
diff --git a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast index 9e9a5f9c5..c2dea1cc1 100644 --- a/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast +++ b/crates/syntax/test_data/parser/inline/ok/0161_labeled_block.rast | |||
@@ -14,7 +14,8 @@ [email protected] | |||
14 | [email protected] | 14 | [email protected] |
15 | [email protected] | 15 | [email protected] |
16 | [email protected] | 16 | [email protected] |
17 | [email protected] "\'label" | 17 | [email protected] |
18 | [email protected] "\'label" | ||
18 | [email protected] ":" | 19 | [email protected] ":" |
19 | [email protected] " " | 20 | [email protected] " " |
20 | [email protected] | 21 | [email protected] |
diff --git a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast index 630aa0708..83e17757b 100644 --- a/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast +++ b/crates/syntax/test_data/parser/ok/0018_struct_type_params.rast | |||
@@ -80,7 +80,8 @@ [email protected] | |||
80 | [email protected] | 80 | [email protected] |
81 | [email protected] "<" | 81 | [email protected] "<" |
82 | [email protected] | 82 | [email protected] |
83 | [email protected] "\'a" | 83 | [email protected] |
84 | [email protected] "\'a" | ||
84 | [email protected] ">" | 85 | [email protected] ">" |
85 | [email protected] ";" | 86 | [email protected] ";" |
86 | [email protected] "\n" | 87 | [email protected] "\n" |
@@ -92,7 +93,8 @@ [email protected] | |||
92 | [email protected] | 93 | [email protected] |
93 | [email protected] "<" | 94 | [email protected] "<" |
94 | [email protected] | 95 | [email protected] |
95 | [email protected] "\'a" | 96 | [email protected] |
97 | [email protected] "\'a" | ||
96 | [email protected] ":" | 98 | [email protected] ":" |
97 | [email protected] ">" | 99 | [email protected] ">" |
98 | [email protected] ";" | 100 | [email protected] ";" |
@@ -105,10 +107,12 @@ [email protected] | |||
105 | [email protected] | 107 | [email protected] |
106 | [email protected] "<" | 108 | [email protected] "<" |
107 | [email protected] | 109 | [email protected] |
108 | [email protected] "\'a" | 110 | [email protected] |
111 | [email protected] "\'a" | ||
109 | [email protected] ":" | 112 | [email protected] ":" |
110 | [email protected] " " | 113 | [email protected] " " |
111 | [email protected] "\'b" | 114 | [email protected] |
115 | [email protected] "\'b" | ||
112 | [email protected] ">" | 116 | [email protected] ">" |
113 | [email protected] ";" | 117 | [email protected] ";" |
114 | [email protected] "\n" | 118 | [email protected] "\n" |
@@ -120,10 +124,12 @@ [email protected] | |||
120 | [email protected] | 124 | [email protected] |
121 | [email protected] "<" | 125 | [email protected] "<" |
122 | [email protected] | 126 | [email protected] |
123 | [email protected] "\'a" | 127 | [email protected] |
128 | [email protected] "\'a" | ||
124 | [email protected] ":" | 129 | [email protected] ":" |
125 | [email protected] " " | 130 | [email protected] " " |
126 | [email protected] "\'b" | 131 | [email protected] |
132 | [email protected] "\'b" | ||
127 | [email protected] " " | 133 | [email protected] " " |
128 | [email protected] "+" | 134 | [email protected] "+" |
129 | [email protected] " " | 135 | [email protected] " " |
@@ -138,14 +144,17 @@ [email protected] | |||
138 | [email protected] | 144 | [email protected] |
139 | [email protected] "<" | 145 | [email protected] "<" |
140 | [email protected] | 146 | [email protected] |
141 | [email protected] "\'a" | 147 | [email protected] |
148 | [email protected] "\'a" | ||
142 | [email protected] ":" | 149 | [email protected] ":" |
143 | [email protected] " " | 150 | [email protected] " " |
144 | [email protected] "\'b" | 151 | [email protected] |
152 | [email protected] "\'b" | ||
145 | [email protected] " " | 153 | [email protected] " " |
146 | [email protected] "+" | 154 | [email protected] "+" |
147 | [email protected] " " | 155 | [email protected] " " |
148 | [email protected] "\'c" | 156 | [email protected] |
157 | [email protected] "\'c" | ||
149 | [email protected] ">" | 158 | [email protected] ">" |
150 | [email protected] ";" | 159 | [email protected] ";" |
151 | [email protected] "\n" | 160 | [email protected] "\n" |
@@ -157,7 +166,8 @@ [email protected] | |||
157 | [email protected] | 166 | [email protected] |
158 | [email protected] "<" | 167 | [email protected] "<" |
159 | [email protected] | 168 | [email protected] |
160 | [email protected] "\'a" | 169 | [email protected] |
170 | [email protected] "\'a" | ||
161 | [email protected] "," | 171 | [email protected] "," |
162 | [email protected] ">" | 172 | [email protected] ">" |
163 | [email protected] ";" | 173 | [email protected] ";" |
@@ -170,11 +180,13 @@ [email protected] | |||
170 | [email protected] | 180 | [email protected] |
171 | [email protected] "<" | 181 | [email protected] "<" |
172 | [email protected] | 182 | [email protected] |
173 | [email protected] "\'a" | 183 | [email protected] |
184 | [email protected] "\'a" | ||
174 | [email protected] "," | 185 | [email protected] "," |
175 | [email protected] " " | 186 | [email protected] " " |
176 | [email protected] | 187 | [email protected] |
177 | [email protected] "\'b" | 188 | [email protected] |
189 | [email protected] "\'b" | ||
178 | [email protected] ">" | 190 | [email protected] ">" |
179 | [email protected] ";" | 191 | [email protected] ";" |
180 | [email protected] "\n" | 192 | [email protected] "\n" |
@@ -186,18 +198,22 @@ [email protected] | |||
186 | [email protected] | 198 | [email protected] |
187 | [email protected] "<" | 199 | [email protected] "<" |
188 | [email protected] | 200 | [email protected] |
189 | [email protected] "\'a" | 201 | [email protected] |
202 | [email protected] "\'a" | ||
190 | [email protected] ":" | 203 | [email protected] ":" |
191 | [email protected] " " | 204 | [email protected] " " |
192 | [email protected] "\'b" | 205 | [email protected] |
206 | [email protected] "\'b" | ||
193 | [email protected] "+" | 207 | [email protected] "+" |
194 | [email protected] "," | 208 | [email protected] "," |
195 | [email protected] " " | 209 | [email protected] " " |
196 | [email protected] | 210 | [email protected] |
197 | [email protected] "\'b" | 211 | [email protected] |
212 | [email protected] "\'b" | ||
198 | [email protected] ":" | 213 | [email protected] ":" |
199 | [email protected] " " | 214 | [email protected] " " |
200 | [email protected] "\'c" | 215 | [email protected] |
216 | [email protected] "\'c" | ||
201 | [email protected] "," | 217 | [email protected] "," |
202 | [email protected] ">" | 218 | [email protected] ">" |
203 | [email protected] ";" | 219 | [email protected] ";" |
@@ -241,7 +257,8 @@ [email protected] | |||
241 | [email protected] | 257 | [email protected] |
242 | [email protected] "<" | 258 | [email protected] "<" |
243 | [email protected] | 259 | [email protected] |
244 | [email protected] "\'a" | 260 | [email protected] |
261 | [email protected] "\'a" | ||
245 | [email protected] "," | 262 | [email protected] "," |
246 | [email protected] " " | 263 | [email protected] " " |
247 | [email protected] | 264 | [email protected] |
diff --git a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast index 9bdc50e1e..0612a71de 100644 --- a/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast +++ b/crates/syntax/test_data/parser/ok/0020_type_param_bounds.rast | |||
@@ -41,7 +41,8 @@ [email protected] | |||
41 | [email protected] " " | 41 | [email protected] " " |
42 | [email protected] | 42 | [email protected] |
43 | [email protected] | 43 | [email protected] |
44 | [email protected] "\'a" | 44 | [email protected] |
45 | [email protected] "\'a" | ||
45 | [email protected] ">" | 46 | [email protected] ">" |
46 | [email protected] ";" | 47 | [email protected] ";" |
47 | [email protected] "\n" | 48 | [email protected] "\n" |
@@ -59,7 +60,8 @@ [email protected] | |||
59 | [email protected] " " | 60 | [email protected] " " |
60 | [email protected] | 61 | [email protected] |
61 | [email protected] | 62 | [email protected] |
62 | [email protected] "\'a" | 63 | [email protected] |
64 | [email protected] "\'a" | ||
63 | [email protected] " " | 65 | [email protected] " " |
64 | [email protected] "+" | 66 | [email protected] "+" |
65 | [email protected] " " | 67 | [email protected] " " |
@@ -80,12 +82,14 @@ [email protected] | |||
80 | [email protected] " " | 82 | [email protected] " " |
81 | [email protected] | 83 | [email protected] |
82 | [email protected] | 84 | [email protected] |
83 | [email protected] "\'a" | 85 | [email protected] |
86 | [email protected] "\'a" | ||
84 | [email protected] " " | 87 | [email protected] " " |
85 | [email protected] "+" | 88 | [email protected] "+" |
86 | [email protected] " " | 89 | [email protected] " " |
87 | [email protected] | 90 | [email protected] |
88 | [email protected] "\'d" | 91 | [email protected] |
92 | [email protected] "\'d" | ||
89 | [email protected] " " | 93 | [email protected] " " |
90 | [email protected] ">" | 94 | [email protected] ">" |
91 | [email protected] ";" | 95 | [email protected] ";" |
@@ -104,12 +108,14 @@ [email protected] | |||
104 | [email protected] " " | 108 | [email protected] " " |
105 | [email protected] | 109 | [email protected] |
106 | [email protected] | 110 | [email protected] |
107 | [email protected] "\'a" | 111 | [email protected] |
112 | [email protected] "\'a" | ||
108 | [email protected] " " | 113 | [email protected] " " |
109 | [email protected] "+" | 114 | [email protected] "+" |
110 | [email protected] " " | 115 | [email protected] " " |
111 | [email protected] | 116 | [email protected] |
112 | [email protected] "\'d" | 117 | [email protected] |
118 | [email protected] "\'d" | ||
113 | [email protected] " " | 119 | [email protected] " " |
114 | [email protected] "+" | 120 | [email protected] "+" |
115 | [email protected] " " | 121 | [email protected] " " |
@@ -190,7 +196,8 @@ [email protected] | |||
190 | [email protected] "+" | 196 | [email protected] "+" |
191 | [email protected] " " | 197 | [email protected] " " |
192 | [email protected] | 198 | [email protected] |
193 | [email protected] "\'a" | 199 | [email protected] |
200 | [email protected] "\'a" | ||
194 | [email protected] ">" | 201 | [email protected] ">" |
195 | [email protected] ";" | 202 | [email protected] ";" |
196 | [email protected] "\n" | 203 | [email protected] "\n" |
@@ -225,21 +232,26 @@ [email protected] | |||
225 | [email protected] | 232 | [email protected] |
226 | [email protected] "<" | 233 | [email protected] "<" |
227 | [email protected] | 234 | [email protected] |
228 | [email protected] "\'a" | 235 | [email protected] |
236 | [email protected] "\'a" | ||
229 | [email protected] ":" | 237 | [email protected] ":" |
230 | [email protected] " " | 238 | [email protected] " " |
231 | [email protected] "\'d" | 239 | [email protected] |
240 | [email protected] "\'d" | ||
232 | [email protected] "," | 241 | [email protected] "," |
233 | [email protected] " " | 242 | [email protected] " " |
234 | [email protected] | 243 | [email protected] |
235 | [email protected] "\'d" | 244 | [email protected] |
245 | [email protected] "\'d" | ||
236 | [email protected] ":" | 246 | [email protected] ":" |
237 | [email protected] " " | 247 | [email protected] " " |
238 | [email protected] "\'a" | 248 | [email protected] |
249 | [email protected] "\'a" | ||
239 | [email protected] " " | 250 | [email protected] " " |
240 | [email protected] "+" | 251 | [email protected] "+" |
241 | [email protected] " " | 252 | [email protected] " " |
242 | [email protected] "\'b" | 253 | [email protected] |
254 | [email protected] "\'b" | ||
243 | [email protected] "," | 255 | [email protected] "," |
244 | [email protected] " " | 256 | [email protected] " " |
245 | [email protected] | 257 | [email protected] |
@@ -249,12 +261,14 @@ [email protected] | |||
249 | [email protected] " " | 261 | [email protected] " " |
250 | [email protected] | 262 | [email protected] |
251 | [email protected] | 263 | [email protected] |
252 | [email protected] "\'a" | 264 | [email protected] |
265 | [email protected] "\'a" | ||
253 | [email protected] " " | 266 | [email protected] " " |
254 | [email protected] "+" | 267 | [email protected] "+" |
255 | [email protected] " " | 268 | [email protected] " " |
256 | [email protected] | 269 | [email protected] |
257 | [email protected] "\'d" | 270 | [email protected] |
271 | [email protected] "\'d" | ||
258 | [email protected] " " | 272 | [email protected] " " |
259 | [email protected] "+" | 273 | [email protected] "+" |
260 | [email protected] " " | 274 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/ok/0032_where_for.rast b/crates/syntax/test_data/parser/ok/0032_where_for.rast index d59548f21..0cb2eca33 100644 --- a/crates/syntax/test_data/parser/ok/0032_where_for.rast +++ b/crates/syntax/test_data/parser/ok/0032_where_for.rast | |||
@@ -41,7 +41,8 @@ [email protected] | |||
41 | [email protected] | 41 | [email protected] |
42 | [email protected] "<" | 42 | [email protected] "<" |
43 | [email protected] | 43 | [email protected] |
44 | [email protected] "\'de" | 44 | [email protected] |
45 | [email protected] "\'de" | ||
45 | [email protected] ">" | 46 | [email protected] ">" |
46 | [email protected] " " | 47 | [email protected] " " |
47 | [email protected] | 48 | [email protected] |
@@ -52,7 +53,8 @@ [email protected] | |||
52 | [email protected] | 53 | [email protected] |
53 | [email protected] "<" | 54 | [email protected] "<" |
54 | [email protected] | 55 | [email protected] |
55 | [email protected] "\'de" | 56 | [email protected] |
57 | [email protected] "\'de" | ||
56 | [email protected] ">" | 58 | [email protected] ">" |
57 | [email protected] " " | 59 | [email protected] " " |
58 | [email protected] "+" | 60 | [email protected] "+" |
diff --git a/crates/syntax/test_data/parser/ok/0033_label_break.rast b/crates/syntax/test_data/parser/ok/0033_label_break.rast index 88800ca7a..487e073ba 100644 --- a/crates/syntax/test_data/parser/ok/0033_label_break.rast +++ b/crates/syntax/test_data/parser/ok/0033_label_break.rast | |||
@@ -16,7 +16,8 @@ [email protected] | |||
16 | [email protected] | 16 | [email protected] |
17 | [email protected] | 17 | [email protected] |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "\'empty_block" | 19 | [email protected] |
20 | [email protected] "\'empty_block" | ||
20 | [email protected] ":" | 21 | [email protected] ":" |
21 | [email protected] " " | 22 | [email protected] " " |
22 | [email protected] | 23 | [email protected] |
@@ -26,7 +27,8 @@ [email protected] | |||
26 | [email protected] | 27 | [email protected] |
27 | [email protected] | 28 | [email protected] |
28 | [email protected] | 29 | [email protected] |
29 | [email protected] "\'block" | 30 | [email protected] |
31 | [email protected] "\'block" | ||
30 | [email protected] ":" | 32 | [email protected] ":" |
31 | [email protected] " " | 33 | [email protected] " " |
32 | [email protected] | 34 | [email protected] |
@@ -66,7 +68,8 @@ [email protected] | |||
66 | [email protected] | 68 | [email protected] |
67 | [email protected] "break" | 69 | [email protected] "break" |
68 | [email protected] " " | 70 | [email protected] " " |
69 | [email protected] "\'block" | 71 | [email protected] |
72 | [email protected] "\'block" | ||
70 | [email protected] ";" | 73 | [email protected] ";" |
71 | [email protected] "\n " | 74 | [email protected] "\n " |
72 | [email protected] "}" | 75 | [email protected] "}" |
@@ -105,7 +108,8 @@ [email protected] | |||
105 | [email protected] | 108 | [email protected] |
106 | [email protected] "break" | 109 | [email protected] "break" |
107 | [email protected] " " | 110 | [email protected] " " |
108 | [email protected] "\'block" | 111 | [email protected] |
112 | [email protected] "\'block" | ||
109 | [email protected] ";" | 113 | [email protected] ";" |
110 | [email protected] "\n " | 114 | [email protected] "\n " |
111 | [email protected] "}" | 115 | [email protected] "}" |
@@ -135,7 +139,8 @@ [email protected] | |||
135 | [email protected] " " | 139 | [email protected] " " |
136 | [email protected] | 140 | [email protected] |
137 | [email protected] | 141 | [email protected] |
138 | [email protected] "\'block" | 142 | [email protected] |
143 | [email protected] "\'block" | ||
139 | [email protected] ":" | 144 | [email protected] ":" |
140 | [email protected] " " | 145 | [email protected] " " |
141 | [email protected] | 146 | [email protected] |
@@ -165,7 +170,8 @@ [email protected] | |||
165 | [email protected] | 170 | [email protected] |
166 | [email protected] "break" | 171 | [email protected] "break" |
167 | [email protected] " " | 172 | [email protected] " " |
168 | [email protected] "\'block" | 173 | [email protected] |
174 | [email protected] "\'block" | ||
169 | [email protected] " " | 175 | [email protected] " " |
170 | [email protected] | 176 | [email protected] |
171 | [email protected] "1" | 177 | [email protected] "1" |
@@ -197,7 +203,8 @@ [email protected] | |||
197 | [email protected] | 203 | [email protected] |
198 | [email protected] "break" | 204 | [email protected] "break" |
199 | [email protected] " " | 205 | [email protected] " " |
200 | [email protected] "\'block" | 206 | [email protected] |
207 | [email protected] "\'block" | ||
201 | [email protected] " " | 208 | [email protected] " " |
202 | [email protected] | 209 | [email protected] |
203 | [email protected] "2" | 210 | [email protected] "2" |
diff --git a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast index 7c61b5006..46b192dc1 100644 --- a/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast +++ b/crates/syntax/test_data/parser/ok/0035_weird_exprs.rast | |||
@@ -1373,14 +1373,14 @@ [email protected] | |||
1373 | [email protected] " " | 1373 | [email protected] " " |
1374 | [email protected] "u8" | 1374 | [email protected] "u8" |
1375 | [email protected] "<" | 1375 | [email protected] "<" |
1376 | [email protected] "\'u8" | 1376 | LIFETIME_IDENT@2380..2383 "\'u8" |
1377 | [email protected] ":" | 1377 | [email protected] ":" |
1378 | [email protected] " " | 1378 | [email protected] " " |
1379 | [email protected] "\'u8" | 1379 | LIFETIME_IDENT@2385..2388 "\'u8" |
1380 | [email protected] " " | 1380 | [email protected] " " |
1381 | [email protected] "+" | 1381 | [email protected] "+" |
1382 | [email protected] " " | 1382 | [email protected] " " |
1383 | [email protected] "\'u8" | 1383 | LIFETIME_IDENT@2391..2394 "\'u8" |
1384 | [email protected] ">" | 1384 | [email protected] ">" |
1385 | [email protected] | 1385 | [email protected] |
1386 | [email protected] "(" | 1386 | [email protected] "(" |
@@ -1388,7 +1388,7 @@ [email protected] | |||
1388 | [email protected] ":" | 1388 | [email protected] ":" |
1389 | [email protected] " " | 1389 | [email protected] " " |
1390 | [email protected] "&" | 1390 | [email protected] "&" |
1391 | [email protected] "\'u8" | 1391 | LIFETIME_IDENT@2401..2404 "\'u8" |
1392 | [email protected] " " | 1392 | [email protected] " " |
1393 | [email protected] "u8" | 1393 | [email protected] "u8" |
1394 | [email protected] ")" | 1394 | [email protected] ")" |
@@ -1397,7 +1397,7 @@ [email protected] | |||
1397 | [email protected] ">" | 1397 | [email protected] ">" |
1398 | [email protected] " " | 1398 | [email protected] " " |
1399 | [email protected] "&" | 1399 | [email protected] "&" |
1400 | [email protected] "\'u8" | 1400 | LIFETIME_IDENT@2413..2416 "\'u8" |
1401 | [email protected] " " | 1401 | [email protected] " " |
1402 | [email protected] "u8" | 1402 | [email protected] "u8" |
1403 | [email protected] " " | 1403 | [email protected] " " |
@@ -1568,7 +1568,8 @@ [email protected] | |||
1568 | [email protected] | 1568 | [email protected] |
1569 | [email protected] "<" | 1569 | [email protected] "<" |
1570 | [email protected] | 1570 | [email protected] |
1571 | [email protected] "\'union" | 1571 | [email protected] |
1572 | [email protected] "\'union" | ||
1572 | [email protected] ">" | 1573 | [email protected] ">" |
1573 | [email protected] " " | 1574 | [email protected] " " |
1574 | [email protected] | 1575 | [email protected] |
@@ -1581,7 +1582,8 @@ [email protected] | |||
1581 | [email protected] " " | 1582 | [email protected] " " |
1582 | [email protected] | 1583 | [email protected] |
1583 | [email protected] "&" | 1584 | [email protected] "&" |
1584 | [email protected] "\'union" | 1585 | [email protected] |
1586 | [email protected] "\'union" | ||
1585 | [email protected] " " | 1587 | [email protected] " " |
1586 | [email protected] | 1588 | [email protected] |
1587 | [email protected] | 1589 | [email protected] |
@@ -1591,7 +1593,8 @@ [email protected] | |||
1591 | [email protected] | 1593 | [email protected] |
1592 | [email protected] "<" | 1594 | [email protected] "<" |
1593 | [email protected] | 1595 | [email protected] |
1594 | [email protected] "\'union" | 1596 | [email protected] |
1597 | [email protected] "\'union" | ||
1595 | [email protected] ">" | 1598 | [email protected] ">" |
1596 | [email protected] "," | 1599 | [email protected] "," |
1597 | [email protected] " " | 1600 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast index d4f05f279..8974f9e40 100644 --- a/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast +++ b/crates/syntax/test_data/parser/ok/0051_parameter_attrs.rast | |||
@@ -175,7 +175,8 @@ [email protected] | |||
175 | [email protected] | 175 | [email protected] |
176 | [email protected] "<" | 176 | [email protected] "<" |
177 | [email protected] | 177 | [email protected] |
178 | [email protected] "\'a" | 178 | [email protected] |
179 | [email protected] "\'a" | ||
179 | [email protected] ">" | 180 | [email protected] ">" |
180 | [email protected] ")" | 181 | [email protected] ")" |
181 | [email protected] ">" | 182 | [email protected] ">" |
@@ -344,7 +345,8 @@ [email protected] | |||
344 | [email protected] | 345 | [email protected] |
345 | [email protected] "<" | 346 | [email protected] "<" |
346 | [email protected] | 347 | [email protected] |
347 | [email protected] "\'a" | 348 | [email protected] |
349 | [email protected] "\'a" | ||
348 | [email protected] ">" | 350 | [email protected] ">" |
349 | [email protected] | 351 | [email protected] |
350 | [email protected] "(" | 352 | [email protected] "(" |
@@ -376,7 +378,8 @@ [email protected] | |||
376 | [email protected] | 378 | [email protected] |
377 | [email protected] "<" | 379 | [email protected] "<" |
378 | [email protected] | 380 | [email protected] |
379 | [email protected] "\'a" | 381 | [email protected] |
382 | [email protected] "\'a" | ||
380 | [email protected] ">" | 383 | [email protected] ">" |
381 | [email protected] | 384 | [email protected] |
382 | [email protected] "(" | 385 | [email protected] "(" |
@@ -391,7 +394,8 @@ [email protected] | |||
391 | [email protected] " " | 394 | [email protected] " " |
392 | [email protected] | 395 | [email protected] |
393 | [email protected] "&" | 396 | [email protected] "&" |
394 | [email protected] "\'a" | 397 | [email protected] |
398 | [email protected] "\'a" | ||
395 | [email protected] " " | 399 | [email protected] " " |
396 | [email protected] "self" | 400 | [email protected] "self" |
397 | [email protected] ")" | 401 | [email protected] ")" |
@@ -408,7 +412,8 @@ [email protected] | |||
408 | [email protected] | 412 | [email protected] |
409 | [email protected] "<" | 413 | [email protected] "<" |
410 | [email protected] | 414 | [email protected] |
411 | [email protected] "\'a" | 415 | [email protected] |
416 | [email protected] "\'a" | ||
412 | [email protected] ">" | 417 | [email protected] ">" |
413 | [email protected] | 418 | [email protected] |
414 | [email protected] "(" | 419 | [email protected] "(" |
@@ -423,7 +428,8 @@ [email protected] | |||
423 | [email protected] " " | 428 | [email protected] " " |
424 | [email protected] | 429 | [email protected] |
425 | [email protected] "&" | 430 | [email protected] "&" |
426 | [email protected] "\'a" | 431 | [email protected] |
432 | [email protected] "\'a" | ||
427 | [email protected] " " | 433 | [email protected] " " |
428 | [email protected] "mut" | 434 | [email protected] "mut" |
429 | [email protected] " " | 435 | [email protected] " " |
diff --git a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast index 8f8639a37..325e9e655 100644 --- a/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast +++ b/crates/syntax/test_data/parser/ok/0067_where_for_pred.rast | |||
@@ -22,7 +22,8 @@ [email protected] | |||
22 | [email protected] | 22 | [email protected] |
23 | [email protected] "<" | 23 | [email protected] "<" |
24 | [email protected] | 24 | [email protected] |
25 | [email protected] "\'a" | 25 | [email protected] |
26 | [email protected] "\'a" | ||
26 | [email protected] ">" | 27 | [email protected] ">" |
27 | [email protected] " " | 28 | [email protected] " " |
28 | [email protected] | 29 | [email protected] |
@@ -44,7 +45,8 @@ [email protected] | |||
44 | [email protected] | 45 | [email protected] |
45 | [email protected] | 46 | [email protected] |
46 | [email protected] "&" | 47 | [email protected] "&" |
47 | [email protected] "\'a" | 48 | [email protected] |
49 | [email protected] "\'a" | ||
48 | [email protected] " " | 50 | [email protected] " " |
49 | [email protected] | 51 | [email protected] |
50 | [email protected] | 52 | [email protected] |
@@ -82,12 +84,14 @@ [email protected] | |||
82 | [email protected] | 84 | [email protected] |
83 | [email protected] "<" | 85 | [email protected] "<" |
84 | [email protected] | 86 | [email protected] |
85 | [email protected] "\'a" | 87 | [email protected] |
88 | [email protected] "\'a" | ||
86 | [email protected] ">" | 89 | [email protected] ">" |
87 | [email protected] " " | 90 | [email protected] " " |
88 | [email protected] | 91 | [email protected] |
89 | [email protected] "&" | 92 | [email protected] "&" |
90 | [email protected] "\'a" | 93 | [email protected] |
94 | [email protected] "\'a" | ||
91 | [email protected] " " | 95 | [email protected] " " |
92 | [email protected] | 96 | [email protected] |
93 | [email protected] | 97 | [email protected] |
@@ -133,14 +137,16 @@ [email protected] | |||
133 | [email protected] | 137 | [email protected] |
134 | [email protected] "<" | 138 | [email protected] "<" |
135 | [email protected] | 139 | [email protected] |
136 | [email protected] "\'a" | 140 | [email protected] |
141 | [email protected] "\'a" | ||
137 | [email protected] ">" | 142 | [email protected] ">" |
138 | [email protected] " " | 143 | [email protected] " " |
139 | [email protected] | 144 | [email protected] |
140 | [email protected] "(" | 145 | [email protected] "(" |
141 | [email protected] | 146 | [email protected] |
142 | [email protected] "&" | 147 | [email protected] "&" |
143 | [email protected] "\'a" | 148 | [email protected] |
149 | [email protected] "\'a" | ||
144 | [email protected] " " | 150 | [email protected] " " |
145 | [email protected] | 151 | [email protected] |
146 | [email protected] | 152 | [email protected] |
@@ -162,7 +168,8 @@ [email protected] | |||
162 | [email protected] | 168 | [email protected] |
163 | [email protected] | 169 | [email protected] |
164 | [email protected] "&" | 170 | [email protected] "&" |
165 | [email protected] "\'a" | 171 | [email protected] |
172 | [email protected] "\'a" | ||
166 | [email protected] " " | 173 | [email protected] " " |
167 | [email protected] | 174 | [email protected] |
168 | [email protected] | 175 | [email protected] |
@@ -200,14 +207,16 @@ [email protected] | |||
200 | [email protected] | 207 | [email protected] |
201 | [email protected] "<" | 208 | [email protected] "<" |
202 | [email protected] | 209 | [email protected] |
203 | [email protected] "\'a" | 210 | [email protected] |
211 | [email protected] "\'a" | ||
204 | [email protected] ">" | 212 | [email protected] ">" |
205 | [email protected] " " | 213 | [email protected] " " |
206 | [email protected] | 214 | [email protected] |
207 | [email protected] "[" | 215 | [email protected] "[" |
208 | [email protected] | 216 | [email protected] |
209 | [email protected] "&" | 217 | [email protected] "&" |
210 | [email protected] "\'a" | 218 | [email protected] |
219 | [email protected] "\'a" | ||
211 | [email protected] " " | 220 | [email protected] " " |
212 | [email protected] | 221 | [email protected] |
213 | [email protected] | 222 | [email protected] |
@@ -267,7 +276,8 @@ [email protected] | |||
267 | [email protected] | 276 | [email protected] |
268 | [email protected] "<" | 277 | [email protected] "<" |
269 | [email protected] | 278 | [email protected] |
270 | [email protected] "\'a" | 279 | [email protected] |
280 | [email protected] "\'a" | ||
271 | [email protected] ">" | 281 | [email protected] ">" |
272 | [email protected] " " | 282 | [email protected] " " |
273 | [email protected] | 283 | [email protected] |
@@ -277,7 +287,8 @@ [email protected] | |||
277 | [email protected] "<" | 287 | [email protected] "<" |
278 | [email protected] | 288 | [email protected] |
279 | [email protected] "&" | 289 | [email protected] "&" |
280 | [email protected] "\'a" | 290 | [email protected] |
291 | [email protected] "\'a" | ||
281 | [email protected] " " | 292 | [email protected] " " |
282 | [email protected] | 293 | [email protected] |
283 | [email protected] | 294 | [email protected] |
@@ -336,7 +347,8 @@ [email protected] | |||
336 | [email protected] | 347 | [email protected] |
337 | [email protected] "<" | 348 | [email protected] "<" |
338 | [email protected] | 349 | [email protected] |
339 | [email protected] "\'a" | 350 | [email protected] |
351 | [email protected] "\'a" | ||
340 | [email protected] ">" | 352 | [email protected] ">" |
341 | [email protected] " " | 353 | [email protected] " " |
342 | [email protected] | 354 | [email protected] |
@@ -344,7 +356,8 @@ [email protected] | |||
344 | [email protected] | 356 | [email protected] |
345 | [email protected] "<" | 357 | [email protected] "<" |
346 | [email protected] | 358 | [email protected] |
347 | [email protected] "\'b" | 359 | [email protected] |
360 | [email protected] "\'b" | ||
348 | [email protected] ">" | 361 | [email protected] ">" |
349 | [email protected] " " | 362 | [email protected] " " |
350 | [email protected] | 363 | [email protected] |
@@ -354,7 +367,8 @@ [email protected] | |||
354 | [email protected] | 367 | [email protected] |
355 | [email protected] | 368 | [email protected] |
356 | [email protected] "&" | 369 | [email protected] "&" |
357 | [email protected] "\'a" | 370 | [email protected] |
371 | [email protected] "\'a" | ||
358 | [email protected] " " | 372 | [email protected] " " |
359 | [email protected] | 373 | [email protected] |
360 | [email protected] | 374 | [email protected] |
@@ -366,7 +380,8 @@ [email protected] | |||
366 | [email protected] | 380 | [email protected] |
367 | [email protected] | 381 | [email protected] |
368 | [email protected] "&" | 382 | [email protected] "&" |
369 | [email protected] "\'b" | 383 | [email protected] |
384 | [email protected] "\'b" | ||
370 | [email protected] " " | 385 | [email protected] " " |
371 | [email protected] | 386 | [email protected] |
372 | [email protected] | 387 | [email protected] |
diff --git a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast index 0cd868a83..8d3e187ae 100644 --- a/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast +++ b/crates/syntax/test_data/parser/ok/0069_multi_trait_object.rast | |||
@@ -7,14 +7,16 @@ [email protected] | |||
7 | [email protected] | 7 | [email protected] |
8 | [email protected] "<" | 8 | [email protected] "<" |
9 | [email protected] | 9 | [email protected] |
10 | [email protected] "\'a" | 10 | [email protected] |
11 | [email protected] "\'a" | ||
11 | [email protected] ">" | 12 | [email protected] ">" |
12 | [email protected] " " | 13 | [email protected] " " |
13 | [email protected] "=" | 14 | [email protected] "=" |
14 | [email protected] " " | 15 | [email protected] " " |
15 | [email protected] | 16 | [email protected] |
16 | [email protected] "&" | 17 | [email protected] "&" |
17 | [email protected] "\'a" | 18 | [email protected] |
19 | [email protected] "\'a" | ||
18 | [email protected] " " | 20 | [email protected] " " |
19 | [email protected] | 21 | [email protected] |
20 | [email protected] "(" | 22 | [email protected] "(" |
@@ -109,7 +111,8 @@ [email protected] | |||
109 | [email protected] "+" | 111 | [email protected] "+" |
110 | [email protected] " " | 112 | [email protected] " " |
111 | [email protected] | 113 | [email protected] |
112 | [email protected] "\'static" | 114 | [email protected] |
115 | [email protected] "\'static" | ||
113 | [email protected] ")" | 116 | [email protected] ")" |
114 | [email protected] ";" | 117 | [email protected] ";" |
115 | [email protected] "\n" | 118 | [email protected] "\n" |