aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 15:21:30 +0100
committerAleksey Kladov <[email protected]>2020-07-30 15:21:30 +0100
commit6f8aa75329d0a4e588e58b8f22f7932bf3d3a706 (patch)
tree9bf4ba410b86ee0b262ce1b0379bbf8dc64b07e6 /crates/ra_syntax
parent98ec5f2c21d0072e4811309ac111db75b87146d1 (diff)
Rename RecordLit -> RecordExpr
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast/edit.rs10
-rw-r--r--crates/ra_syntax/src/ast/expr_ext.rs6
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs50
-rw-r--r--crates/ra_syntax/src/ast/make.rs4
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs8
-rw-r--r--crates/ra_syntax/src/validation.rs2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast26
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast12
14 files changed, 78 insertions, 76 deletions
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 0110300af..8d3e42f25 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -116,18 +116,18 @@ impl ast::AssocItemList {
116 } 116 }
117} 117}
118 118
119impl ast::RecordFieldList { 119impl ast::RecordExprFieldList {
120 #[must_use] 120 #[must_use]
121 pub fn append_field(&self, field: &ast::RecordField) -> ast::RecordFieldList { 121 pub fn append_field(&self, field: &ast::RecordExprField) -> ast::RecordExprFieldList {
122 self.insert_field(InsertPosition::Last, field) 122 self.insert_field(InsertPosition::Last, field)
123 } 123 }
124 124
125 #[must_use] 125 #[must_use]
126 pub fn insert_field( 126 pub fn insert_field(
127 &self, 127 &self,
128 position: InsertPosition<&'_ ast::RecordField>, 128 position: InsertPosition<&'_ ast::RecordExprField>,
129 field: &ast::RecordField, 129 field: &ast::RecordExprField,
130 ) -> ast::RecordFieldList { 130 ) -> ast::RecordExprFieldList {
131 let is_multiline = self.syntax().text().contains_char('\n'); 131 let is_multiline = self.syntax().text().contains_char('\n');
132 let ws; 132 let ws;
133 let space = if is_multiline { 133 let space = if is_multiline {
diff --git a/crates/ra_syntax/src/ast/expr_ext.rs b/crates/ra_syntax/src/ast/expr_ext.rs
index 8692b9bb5..365f94287 100644
--- a/crates/ra_syntax/src/ast/expr_ext.rs
+++ b/crates/ra_syntax/src/ast/expr_ext.rs
@@ -412,8 +412,8 @@ fn test_literal_with_attr() {
412 assert_eq!(lit.token().text(), r#""Hello""#); 412 assert_eq!(lit.token().text(), r#""Hello""#);
413} 413}
414 414
415impl ast::RecordField { 415impl ast::RecordExprField {
416 pub fn parent_record_lit(&self) -> ast::RecordLit { 416 pub fn parent_record_lit(&self) -> ast::RecordExpr {
417 self.syntax().ancestors().find_map(ast::RecordLit::cast).unwrap() 417 self.syntax().ancestors().find_map(ast::RecordExpr::cast).unwrap()
418 } 418 }
419} 419}
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index efe0cbe3a..9f9c06e50 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -909,30 +909,32 @@ impl MatchGuard {
909 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 909 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
910} 910}
911#[derive(Debug, Clone, PartialEq, Eq, Hash)] 911#[derive(Debug, Clone, PartialEq, Eq, Hash)]
912pub struct RecordLit { 912pub struct RecordExpr {
913 pub(crate) syntax: SyntaxNode, 913 pub(crate) syntax: SyntaxNode,
914} 914}
915impl RecordLit { 915impl RecordExpr {
916 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) } 916 pub fn path(&self) -> Option<Path> { support::child(&self.syntax) }
917 pub fn record_field_list(&self) -> Option<RecordFieldList> { support::child(&self.syntax) } 917 pub fn record_expr_field_list(&self) -> Option<RecordExprFieldList> {
918 support::child(&self.syntax)
919 }
918} 920}
919#[derive(Debug, Clone, PartialEq, Eq, Hash)] 921#[derive(Debug, Clone, PartialEq, Eq, Hash)]
920pub struct RecordFieldList { 922pub struct RecordExprFieldList {
921 pub(crate) syntax: SyntaxNode, 923 pub(crate) syntax: SyntaxNode,
922} 924}
923impl RecordFieldList { 925impl RecordExprFieldList {
924 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } 926 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
925 pub fn fields(&self) -> AstChildren<RecordField> { support::children(&self.syntax) } 927 pub fn fields(&self) -> AstChildren<RecordExprField> { support::children(&self.syntax) }
926 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } 928 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
927 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) } 929 pub fn spread(&self) -> Option<Expr> { support::child(&self.syntax) }
928 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) } 930 pub fn r_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['}']) }
929} 931}
930#[derive(Debug, Clone, PartialEq, Eq, Hash)] 932#[derive(Debug, Clone, PartialEq, Eq, Hash)]
931pub struct RecordField { 933pub struct RecordExprField {
932 pub(crate) syntax: SyntaxNode, 934 pub(crate) syntax: SyntaxNode,
933} 935}
934impl ast::AttrsOwner for RecordField {} 936impl ast::AttrsOwner for RecordExprField {}
935impl RecordField { 937impl RecordExprField {
936 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) } 938 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
937 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } 939 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
938 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 940 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
@@ -1345,7 +1347,7 @@ pub enum Expr {
1345 BlockExpr(BlockExpr), 1347 BlockExpr(BlockExpr),
1346 ReturnExpr(ReturnExpr), 1348 ReturnExpr(ReturnExpr),
1347 MatchExpr(MatchExpr), 1349 MatchExpr(MatchExpr),
1348 RecordLit(RecordLit), 1350 RecordExpr(RecordExpr),
1349 CallExpr(CallExpr), 1351 CallExpr(CallExpr),
1350 IndexExpr(IndexExpr), 1352 IndexExpr(IndexExpr),
1351 MethodCallExpr(MethodCallExpr), 1353 MethodCallExpr(MethodCallExpr),
@@ -2357,8 +2359,8 @@ impl AstNode for MatchGuard {
2357 } 2359 }
2358 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2360 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2359} 2361}
2360impl AstNode for RecordLit { 2362impl AstNode for RecordExpr {
2361 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_LIT } 2363 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR }
2362 fn cast(syntax: SyntaxNode) -> Option<Self> { 2364 fn cast(syntax: SyntaxNode) -> Option<Self> {
2363 if Self::can_cast(syntax.kind()) { 2365 if Self::can_cast(syntax.kind()) {
2364 Some(Self { syntax }) 2366 Some(Self { syntax })
@@ -2368,8 +2370,8 @@ impl AstNode for RecordLit {
2368 } 2370 }
2369 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2371 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2370} 2372}
2371impl AstNode for RecordFieldList { 2373impl AstNode for RecordExprFieldList {
2372 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_LIST } 2374 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD_LIST }
2373 fn cast(syntax: SyntaxNode) -> Option<Self> { 2375 fn cast(syntax: SyntaxNode) -> Option<Self> {
2374 if Self::can_cast(syntax.kind()) { 2376 if Self::can_cast(syntax.kind()) {
2375 Some(Self { syntax }) 2377 Some(Self { syntax })
@@ -2379,8 +2381,8 @@ impl AstNode for RecordFieldList {
2379 } 2381 }
2380 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2382 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2381} 2383}
2382impl AstNode for RecordField { 2384impl AstNode for RecordExprField {
2383 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD } 2385 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_EXPR_FIELD }
2384 fn cast(syntax: SyntaxNode) -> Option<Self> { 2386 fn cast(syntax: SyntaxNode) -> Option<Self> {
2385 if Self::can_cast(syntax.kind()) { 2387 if Self::can_cast(syntax.kind()) {
2386 Some(Self { syntax }) 2388 Some(Self { syntax })
@@ -3119,8 +3121,8 @@ impl From<ReturnExpr> for Expr {
3119impl From<MatchExpr> for Expr { 3121impl From<MatchExpr> for Expr {
3120 fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) } 3122 fn from(node: MatchExpr) -> Expr { Expr::MatchExpr(node) }
3121} 3123}
3122impl From<RecordLit> for Expr { 3124impl From<RecordExpr> for Expr {
3123 fn from(node: RecordLit) -> Expr { Expr::RecordLit(node) } 3125 fn from(node: RecordExpr) -> Expr { Expr::RecordExpr(node) }
3124} 3126}
3125impl From<CallExpr> for Expr { 3127impl From<CallExpr> for Expr {
3126 fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) } 3128 fn from(node: CallExpr) -> Expr { Expr::CallExpr(node) }
@@ -3172,7 +3174,7 @@ impl AstNode for Expr {
3172 match kind { 3174 match kind {
3173 TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR 3175 TUPLE_EXPR | ARRAY_EXPR | PAREN_EXPR | PATH_EXPR | LAMBDA_EXPR | IF_EXPR
3174 | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL 3176 | LOOP_EXPR | FOR_EXPR | WHILE_EXPR | CONTINUE_EXPR | BREAK_EXPR | LABEL
3175 | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_LIT | CALL_EXPR | INDEX_EXPR 3177 | BLOCK_EXPR | RETURN_EXPR | MATCH_EXPR | RECORD_EXPR | CALL_EXPR | INDEX_EXPR
3176 | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | EFFECT_EXPR | CAST_EXPR 3178 | METHOD_CALL_EXPR | FIELD_EXPR | AWAIT_EXPR | TRY_EXPR | EFFECT_EXPR | CAST_EXPR
3177 | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL | BOX_EXPR => { 3179 | REF_EXPR | PREFIX_EXPR | RANGE_EXPR | BIN_EXPR | LITERAL | MACRO_CALL | BOX_EXPR => {
3178 true 3180 true
@@ -3197,7 +3199,7 @@ impl AstNode for Expr {
3197 BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }), 3199 BLOCK_EXPR => Expr::BlockExpr(BlockExpr { syntax }),
3198 RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }), 3200 RETURN_EXPR => Expr::ReturnExpr(ReturnExpr { syntax }),
3199 MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }), 3201 MATCH_EXPR => Expr::MatchExpr(MatchExpr { syntax }),
3200 RECORD_LIT => Expr::RecordLit(RecordLit { syntax }), 3202 RECORD_EXPR => Expr::RecordExpr(RecordExpr { syntax }),
3201 CALL_EXPR => Expr::CallExpr(CallExpr { syntax }), 3203 CALL_EXPR => Expr::CallExpr(CallExpr { syntax }),
3202 INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }), 3204 INDEX_EXPR => Expr::IndexExpr(IndexExpr { syntax }),
3203 METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }), 3205 METHOD_CALL_EXPR => Expr::MethodCallExpr(MethodCallExpr { syntax }),
@@ -3234,7 +3236,7 @@ impl AstNode for Expr {
3234 Expr::BlockExpr(it) => &it.syntax, 3236 Expr::BlockExpr(it) => &it.syntax,
3235 Expr::ReturnExpr(it) => &it.syntax, 3237 Expr::ReturnExpr(it) => &it.syntax,
3236 Expr::MatchExpr(it) => &it.syntax, 3238 Expr::MatchExpr(it) => &it.syntax,
3237 Expr::RecordLit(it) => &it.syntax, 3239 Expr::RecordExpr(it) => &it.syntax,
3238 Expr::CallExpr(it) => &it.syntax, 3240 Expr::CallExpr(it) => &it.syntax,
3239 Expr::IndexExpr(it) => &it.syntax, 3241 Expr::IndexExpr(it) => &it.syntax,
3240 Expr::MethodCallExpr(it) => &it.syntax, 3242 Expr::MethodCallExpr(it) => &it.syntax,
@@ -3893,17 +3895,17 @@ impl std::fmt::Display for MatchGuard {
3893 std::fmt::Display::fmt(self.syntax(), f) 3895 std::fmt::Display::fmt(self.syntax(), f)
3894 } 3896 }
3895} 3897}
3896impl std::fmt::Display for RecordLit { 3898impl std::fmt::Display for RecordExpr {
3897 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3899 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3898 std::fmt::Display::fmt(self.syntax(), f) 3900 std::fmt::Display::fmt(self.syntax(), f)
3899 } 3901 }
3900} 3902}
3901impl std::fmt::Display for RecordFieldList { 3903impl std::fmt::Display for RecordExprFieldList {
3902 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3904 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3903 std::fmt::Display::fmt(self.syntax(), f) 3905 std::fmt::Display::fmt(self.syntax(), f)
3904 } 3906 }
3905} 3907}
3906impl std::fmt::Display for RecordField { 3908impl std::fmt::Display for RecordExprField {
3907 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3909 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3908 std::fmt::Display::fmt(self.syntax(), f) 3910 std::fmt::Display::fmt(self.syntax(), f)
3909 } 3911 }
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 4759f23a5..183ec4481 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -64,13 +64,13 @@ pub fn use_item(use_tree: ast::UseTree) -> ast::Use {
64 ast_from_text(&format!("use {};", use_tree)) 64 ast_from_text(&format!("use {};", use_tree))
65} 65}
66 66
67pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordField { 67pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordExprField {
68 return match expr { 68 return match expr {
69 Some(expr) => from_text(&format!("{}: {}", name, expr)), 69 Some(expr) => from_text(&format!("{}: {}", name, expr)),
70 None => from_text(&name.to_string()), 70 None => from_text(&name.to_string()),
71 }; 71 };
72 72
73 fn from_text(text: &str) -> ast::RecordField { 73 fn from_text(text: &str) -> ast::RecordExprField {
74 ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text)) 74 ast_from_text(&format!("fn f() {{ S {{ {}, }} }}", text))
75 } 75 }
76} 76}
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index a7a301d6b..8c7457e32 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -189,11 +189,11 @@ impl ast::StructDef {
189 } 189 }
190} 190}
191 191
192impl ast::RecordField { 192impl ast::RecordExprField {
193 pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordField> { 193 pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordExprField> {
194 let candidate = 194 let candidate =
195 field_name.syntax().parent().and_then(ast::RecordField::cast).or_else(|| { 195 field_name.syntax().parent().and_then(ast::RecordExprField::cast).or_else(|| {
196 field_name.syntax().ancestors().nth(4).and_then(ast::RecordField::cast) 196 field_name.syntax().ancestors().nth(4).and_then(ast::RecordExprField::cast)
197 })?; 197 })?;
198 if candidate.field_name().as_ref() == Some(field_name) { 198 if candidate.field_name().as_ref() == Some(field_name) {
199 Some(candidate) 199 Some(candidate)
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index 6a2749381..5b4e14676 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -91,7 +91,7 @@ pub(crate) fn validate(root: &SyntaxNode) -> Vec<SyntaxError> {
91 ast::Literal(it) => validate_literal(it, &mut errors), 91 ast::Literal(it) => validate_literal(it, &mut errors),
92 ast::BlockExpr(it) => block::validate_block_expr(it, &mut errors), 92 ast::BlockExpr(it) => block::validate_block_expr(it, &mut errors),
93 ast::FieldExpr(it) => validate_numeric_name(it.name_ref(), &mut errors), 93 ast::FieldExpr(it) => validate_numeric_name(it.name_ref(), &mut errors),
94 ast::RecordField(it) => validate_numeric_name(it.name_ref(), &mut errors), 94 ast::RecordExprField(it) => validate_numeric_name(it.name_ref(), &mut errors),
95 ast::Visibility(it) => validate_visibility(it, &mut errors), 95 ast::Visibility(it) => validate_visibility(it, &mut errors),
96 ast::RangeExpr(it) => validate_range_expr(it, &mut errors), 96 ast::RangeExpr(it) => validate_range_expr(it, &mut errors),
97 ast::PathSegment(it) => validate_path_keywords(it, &mut errors), 97 ast::PathSegment(it) => validate_path_keywords(it, &mut errors),
diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
index ce43ddf45..1ce5f188f 100644
--- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
+++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.rast
@@ -75,16 +75,16 @@ [email protected]
75 [email protected] "push" 75 [email protected] "push"
76 [email protected] 76 [email protected]
77 [email protected] "(" 77 [email protected] "("
78 RECORD_LIT@111..154 78 RECORD_EXPR@111..154
79 [email protected] 79 [email protected]
80 [email protected] 80 [email protected]
81 [email protected] 81 [email protected]
82 [email protected] "ScopeData" 82 [email protected] "ScopeData"
83 [email protected] " " 83 [email protected] " "
84 [email protected] 84 RECORD_EXPR_[email protected]
85 [email protected] "{" 85 [email protected] "{"
86 [email protected] " " 86 [email protected] " "
87 [email protected] 87 RECORD_EXPR_[email protected]
88 [email protected] 88 [email protected]
89 [email protected] "parent" 89 [email protected] "parent"
90 [email protected] ":" 90 [email protected] ":"
@@ -96,7 +96,7 @@ [email protected]
96 [email protected] "None" 96 [email protected] "None"
97 [email protected] "," 97 [email protected] ","
98 [email protected] " " 98 [email protected] " "
99 [email protected] 99 RECORD_EXPR_[email protected]
100 [email protected] 100 [email protected]
101 [email protected] "entries" 101 [email protected] "entries"
102 [email protected] ":" 102 [email protected] ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
index 6753c3fe7..a81c442c0 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
@@ -11,16 +11,16 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 RECORD_LIT@16..42 14 RECORD_EXPR@16..42
15 [email protected] 15 [email protected]
16 [email protected] 16 [email protected]
17 [email protected] 17 [email protected]
18 [email protected] "S" 18 [email protected] "S"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 RECORD_EXPR_[email protected]
21 [email protected] "{" 21 [email protected] "{"
22 [email protected] " " 22 [email protected] " "
23 [email protected] 23 RECORD_EXPR_[email protected]
24 [email protected] 24 [email protected]
25 [email protected] "field" 25 [email protected] "field"
26 [email protected] " " 26 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
index b0aa73b7d..a9ae1aa59 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast
@@ -12,28 +12,28 @@ [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 [email protected] 14 [email protected]
15 RECORD_LIT@15..19 15 RECORD_EXPR@15..19
16 [email protected] 16 [email protected]
17 [email protected] 17 [email protected]
18 [email protected] 18 [email protected]
19 [email protected] "S" 19 [email protected] "S"
20 [email protected] " " 20 [email protected] " "
21 [email protected] 21 RECORD_EXPR_[email protected]
22 [email protected] "{" 22 [email protected] "{"
23 [email protected] "}" 23 [email protected] "}"
24 [email protected] ";" 24 [email protected] ";"
25 [email protected] "\n " 25 [email protected] "\n "
26 [email protected] 26 [email protected]
27 RECORD_LIT@25..40 27 RECORD_EXPR@25..40
28 [email protected] 28 [email protected]
29 [email protected] 29 [email protected]
30 [email protected] 30 [email protected]
31 [email protected] "S" 31 [email protected] "S"
32 [email protected] " " 32 [email protected] " "
33 [email protected] 33 RECORD_EXPR_[email protected]
34 [email protected] "{" 34 [email protected] "{"
35 [email protected] " " 35 [email protected] " "
36 [email protected] 36 RECORD_EXPR_[email protected]
37 [email protected] 37 [email protected]
38 [email protected] 38 [email protected]
39 [email protected] 39 [email protected]
@@ -41,7 +41,7 @@ [email protected]
41 [email protected] "x" 41 [email protected] "x"
42 [email protected] "," 42 [email protected] ","
43 [email protected] " " 43 [email protected] " "
44 [email protected] 44 RECORD_EXPR_[email protected]
45 [email protected] 45 [email protected]
46 [email protected] "y" 46 [email protected] "y"
47 [email protected] ":" 47 [email protected] ":"
@@ -54,16 +54,16 @@ [email protected]
54 [email protected] ";" 54 [email protected] ";"
55 [email protected] "\n " 55 [email protected] "\n "
56 [email protected] 56 [email protected]
57 RECORD_LIT@46..82 57 RECORD_EXPR@46..82
58 [email protected] 58 [email protected]
59 [email protected] 59 [email protected]
60 [email protected] 60 [email protected]
61 [email protected] "S" 61 [email protected] "S"
62 [email protected] " " 62 [email protected] " "
63 [email protected] 63 RECORD_EXPR_[email protected]
64 [email protected] "{" 64 [email protected] "{"
65 [email protected] " " 65 [email protected] " "
66 [email protected] 66 RECORD_EXPR_[email protected]
67 [email protected] 67 [email protected]
68 [email protected] 68 [email protected]
69 [email protected] 69 [email protected]
@@ -71,7 +71,7 @@ [email protected]
71 [email protected] "x" 71 [email protected] "x"
72 [email protected] "," 72 [email protected] ","
73 [email protected] " " 73 [email protected] " "
74 [email protected] 74 RECORD_EXPR_[email protected]
75 [email protected] 75 [email protected]
76 [email protected] "y" 76 [email protected] "y"
77 [email protected] ":" 77 [email protected] ":"
@@ -100,16 +100,16 @@ [email protected]
100 [email protected] ";" 100 [email protected] ";"
101 [email protected] "\n " 101 [email protected] "\n "
102 [email protected] 102 [email protected]
103 RECORD_LIT@88..108 103 RECORD_EXPR@88..108
104 [email protected] 104 [email protected]
105 [email protected] 105 [email protected]
106 [email protected] 106 [email protected]
107 [email protected] "TupleStruct" 107 [email protected] "TupleStruct"
108 [email protected] " " 108 [email protected] " "
109 [email protected] 109 RECORD_EXPR_[email protected]
110 [email protected] "{" 110 [email protected] "{"
111 [email protected] " " 111 [email protected] " "
112 [email protected] 112 RECORD_EXPR_[email protected]
113 [email protected] 113 [email protected]
114 [email protected] "0" 114 [email protected] "0"
115 [email protected] ":" 115 [email protected] ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
index d2279877b..37ca478e6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0066_match_arm.rast
@@ -49,14 +49,14 @@ [email protected]
49 [email protected] " " 49 [email protected] " "
50 [email protected] ">" 50 [email protected] ">"
51 [email protected] " " 51 [email protected] " "
52 RECORD_LIT@63..77 52 RECORD_EXPR@63..77
53 [email protected] 53 [email protected]
54 [email protected] 54 [email protected]
55 [email protected] 55 [email protected]
56 [email protected] "Test" 56 [email protected] "Test"
57 [email protected] 57 RECORD_EXPR_[email protected]
58 [email protected] "{" 58 [email protected] "{"
59 [email protected] 59 RECORD_EXPR_[email protected]
60 [email protected] 60 [email protected]
61 [email protected] "field" 61 [email protected] "field"
62 [email protected] ":" 62 [email protected] ":"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
index d6926425c..673d396ee 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0071_match_expr.rast
@@ -72,13 +72,13 @@ [email protected]
72 [email protected] 72 [email protected]
73 [email protected] "{" 73 [email protected] "{"
74 [email protected] " " 74 [email protected] " "
75 RECORD_LIT@84..88 75 RECORD_EXPR@84..88
76 [email protected] 76 [email protected]
77 [email protected] 77 [email protected]
78 [email protected] 78 [email protected]
79 [email protected] "S" 79 [email protected] "S"
80 [email protected] " " 80 [email protected] " "
81 [email protected] 81 RECORD_EXPR_[email protected]
82 [email protected] "{" 82 [email protected] "{"
83 [email protected] "}" 83 [email protected] "}"
84 [email protected] " " 84 [email protected] " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
index 20979cef3..54ea2c7c6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0125_record_literal_field_with_attr.rast
@@ -11,16 +11,16 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 RECORD_LIT@16..43 14 RECORD_EXPR@16..43
15 [email protected] 15 [email protected]
16 [email protected] 16 [email protected]
17 [email protected] 17 [email protected]
18 [email protected] "S" 18 [email protected] "S"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 RECORD_EXPR_[email protected]
21 [email protected] "{" 21 [email protected] "{"
22 [email protected] " " 22 [email protected] " "
23 [email protected] 23 RECORD_EXPR_[email protected]
24 [email protected] 24 [email protected]
25 [email protected] "#" 25 [email protected] "#"
26 [email protected] "[" 26 [email protected] "["
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
index a03139ab5..a7f87c020 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0138_expression_after_block.rast
@@ -22,14 +22,14 @@ [email protected]
22 [email protected] " " 22 [email protected] " "
23 [email protected] "=" 23 [email protected] "="
24 [email protected] " " 24 [email protected] " "
25 RECORD_LIT@26..33 25 RECORD_EXPR@26..33
26 [email protected] 26 [email protected]
27 [email protected] 27 [email protected]
28 [email protected] 28 [email protected]
29 [email protected] "F" 29 [email protected] "F"
30 [email protected] 30 RECORD_EXPR_[email protected]
31 [email protected] "{" 31 [email protected] "{"
32 [email protected] 32 RECORD_EXPR_[email protected]
33 [email protected] 33 [email protected]
34 [email protected] "x" 34 [email protected] "x"
35 [email protected] ":" 35 [email protected] ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
index 22eb22e3c..1c5545b6d 100644
--- a/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0043_complex_assignment.rast
@@ -46,16 +46,16 @@ [email protected]
46 [email protected] 46 [email protected]
47 [email protected] 47 [email protected]
48 [email protected] 48 [email protected]
49 RECORD_LIT@107..124 49 RECORD_EXPR@107..124
50 [email protected] 50 [email protected]
51 [email protected] 51 [email protected]
52 [email protected] 52 [email protected]
53 [email protected] "Repr" 53 [email protected] "Repr"
54 [email protected] " " 54 [email protected] " "
55 [email protected] 55 RECORD_EXPR_[email protected]
56 [email protected] "{" 56 [email protected] "{"
57 [email protected] " " 57 [email protected] " "
58 [email protected] 58 RECORD_EXPR_[email protected]
59 [email protected] 59 [email protected]
60 [email protected] "raw" 60 [email protected] "raw"
61 [email protected] ":" 61 [email protected] ":"
@@ -83,14 +83,14 @@ [email protected]
83 [email protected] "\n " 83 [email protected] "\n "
84 [email protected] 84 [email protected]
85 [email protected] 85 [email protected]
86 RECORD_LIT@141..154 86 RECORD_EXPR@141..154
87 [email protected] 87 [email protected]
88 [email protected] 88 [email protected]
89 [email protected] 89 [email protected]
90 [email protected] "Repr" 90 [email protected] "Repr"
91 [email protected] 91 RECORD_EXPR_[email protected]
92 [email protected] "{" 92 [email protected] "{"
93 [email protected] 93 RECORD_EXPR_[email protected]
94 [email protected] 94 [email protected]
95 [email protected] "raw" 95 [email protected] "raw"
96 [email protected] ":" 96 [email protected] ":"