aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax')
-rw-r--r--crates/ra_syntax/src/ast.rs4
-rw-r--r--crates/ra_syntax/src/ast/extensions.rs60
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs2
-rw-r--r--crates/ra_syntax/src/ast/make.rs3
-rw-r--r--crates/ra_syntax/src/lib.rs5
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast49
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs3
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0061_record_lit.rast14
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast26
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast15
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast5
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast14
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast14
13 files changed, 174 insertions, 40 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs
index 99c6b7219..7fca5661e 100644
--- a/crates/ra_syntax/src/ast.rs
+++ b/crates/ra_syntax/src/ast.rs
@@ -18,8 +18,8 @@ use crate::{
18pub use self::{ 18pub use self::{
19 expr_extensions::{ArrayExprKind, BinOp, ElseBranch, LiteralKind, PrefixOp, RangeOp}, 19 expr_extensions::{ArrayExprKind, BinOp, ElseBranch, LiteralKind, PrefixOp, RangeOp},
20 extensions::{ 20 extensions::{
21 AttrKind, FieldKind, PathSegmentKind, SelfParamKind, SlicePatComponents, StructKind, 21 AttrKind, FieldKind, NameOrNameRef, PathSegmentKind, SelfParamKind, SlicePatComponents,
22 TypeBoundKind, VisibilityKind, 22 StructKind, TypeBoundKind, VisibilityKind,
23 }, 23 },
24 generated::{nodes::*, tokens::*}, 24 generated::{nodes::*, tokens::*},
25 tokens::*, 25 tokens::*,
diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs
index 76b7655e6..f2ea5088e 100644
--- a/crates/ra_syntax/src/ast/extensions.rs
+++ b/crates/ra_syntax/src/ast/extensions.rs
@@ -1,6 +1,8 @@
1//! Various extension methods to ast Nodes, which are hard to code-generate. 1//! Various extension methods to ast Nodes, which are hard to code-generate.
2//! Extensions for various expressions live in a sibling `expr_extensions` module. 2//! Extensions for various expressions live in a sibling `expr_extensions` module.
3 3
4use std::fmt;
5
4use itertools::Itertools; 6use itertools::Itertools;
5use ra_parser::SyntaxKind; 7use ra_parser::SyntaxKind;
6 8
@@ -187,6 +189,64 @@ impl ast::StructDef {
187 } 189 }
188} 190}
189 191
192impl ast::RecordField {
193 pub fn for_field_name(field_name: &ast::NameRef) -> Option<ast::RecordField> {
194 let candidate =
195 field_name.syntax().parent().and_then(ast::RecordField::cast).or_else(|| {
196 field_name.syntax().ancestors().nth(4).and_then(ast::RecordField::cast)
197 })?;
198 if candidate.field_name().as_ref() == Some(field_name) {
199 Some(candidate)
200 } else {
201 None
202 }
203 }
204
205 /// Deals with field init shorthand
206 pub fn field_name(&self) -> Option<ast::NameRef> {
207 if let Some(name_ref) = self.name_ref() {
208 return Some(name_ref);
209 }
210 if let Some(ast::Expr::PathExpr(expr)) = self.expr() {
211 let path = expr.path()?;
212 let segment = path.segment()?;
213 let name_ref = segment.name_ref()?;
214 if path.qualifier().is_none() {
215 return Some(name_ref);
216 }
217 }
218 None
219 }
220}
221
222pub enum NameOrNameRef {
223 Name(ast::Name),
224 NameRef(ast::NameRef),
225}
226
227impl fmt::Display for NameOrNameRef {
228 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
229 match self {
230 NameOrNameRef::Name(it) => fmt::Display::fmt(it, f),
231 NameOrNameRef::NameRef(it) => fmt::Display::fmt(it, f),
232 }
233 }
234}
235
236impl ast::RecordFieldPat {
237 /// Deals with field init shorthand
238 pub fn field_name(&self) -> Option<NameOrNameRef> {
239 if let Some(name_ref) = self.name_ref() {
240 return Some(NameOrNameRef::NameRef(name_ref));
241 }
242 if let Some(ast::Pat::BindPat(pat)) = self.pat() {
243 let name = pat.name()?;
244 return Some(NameOrNameRef::Name(name));
245 }
246 None
247 }
248}
249
190impl ast::EnumVariant { 250impl ast::EnumVariant {
191 pub fn parent_enum(&self) -> ast::EnumDef { 251 pub fn parent_enum(&self) -> ast::EnumDef {
192 self.syntax() 252 self.syntax()
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index f1098755b..188f0df96 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1806,8 +1806,8 @@ impl AstNode for RecordFieldPat {
1806 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1806 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1807} 1807}
1808impl ast::AttrsOwner for RecordFieldPat {} 1808impl ast::AttrsOwner for RecordFieldPat {}
1809impl ast::NameOwner for RecordFieldPat {}
1810impl RecordFieldPat { 1809impl RecordFieldPat {
1810 pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
1811 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } 1811 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
1812 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1812 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1813} 1813}
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index f39559e9e..0f4a50be4 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -100,6 +100,9 @@ pub fn expr_empty_block() -> ast::Expr {
100pub fn expr_unimplemented() -> ast::Expr { 100pub fn expr_unimplemented() -> ast::Expr {
101 expr_from_text("unimplemented!()") 101 expr_from_text("unimplemented!()")
102} 102}
103pub fn expr_todo() -> ast::Expr {
104 expr_from_text("todo!()")
105}
103pub fn expr_path(path: ast::Path) -> ast::Expr { 106pub fn expr_path(path: ast::Path) -> ast::Expr {
104 expr_from_text(&path.to_string()) 107 expr_from_text(&path.to_string())
105} 108}
diff --git a/crates/ra_syntax/src/lib.rs b/crates/ra_syntax/src/lib.rs
index f0e16dc2b..a796e78b1 100644
--- a/crates/ra_syntax/src/lib.rs
+++ b/crates/ra_syntax/src/lib.rs
@@ -19,6 +19,11 @@
19//! [RFC]: <https://github.com/rust-lang/rfcs/pull/2256> 19//! [RFC]: <https://github.com/rust-lang/rfcs/pull/2256>
20//! [Swift]: <https://github.com/apple/swift/blob/13d593df6f359d0cb2fc81cfaac273297c539455/lib/Syntax/README.md> 20//! [Swift]: <https://github.com/apple/swift/blob/13d593df6f359d0cb2fc81cfaac273297c539455/lib/Syntax/README.md>
21 21
22#[allow(unused)]
23macro_rules! eprintln {
24 ($($tt:tt)*) => { stdx::eprintln!($($tt)*) };
25}
26
22mod syntax_node; 27mod syntax_node;
23mod syntax_error; 28mod syntax_error;
24mod parsing; 29mod parsing;
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
new file mode 100644
index 000000000..75043c9c0
--- /dev/null
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rast
@@ -0,0 +1,49 @@
1SOURCE_FILE@[0; 45)
2 FN_DEF@[0; 44)
3 FN_KW@[0; 2) "fn"
4 WHITESPACE@[2; 3) " "
5 NAME@[3; 7)
6 IDENT@[3; 7) "main"
7 PARAM_LIST@[7; 9)
8 L_PAREN@[7; 8) "("
9 R_PAREN@[8; 9) ")"
10 WHITESPACE@[9; 10) " "
11 BLOCK_EXPR@[10; 44)
12 BLOCK@[10; 44)
13 L_CURLY@[10; 11) "{"
14 WHITESPACE@[11; 16) "\n "
15 RECORD_LIT@[16; 42)
16 PATH@[16; 17)
17 PATH_SEGMENT@[16; 17)
18 NAME_REF@[16; 17)
19 IDENT@[16; 17) "S"
20 WHITESPACE@[17; 18) " "
21 RECORD_FIELD_LIST@[18; 42)
22 L_CURLY@[18; 19) "{"
23 WHITESPACE@[19; 20) " "
24 RECORD_FIELD@[20; 40)
25 NAME_REF@[20; 25)
26 IDENT@[20; 25) "field"
27 WHITESPACE@[25; 26) " "
28 RANGE_EXPR@[26; 40)
29 DOT2@[26; 28) ".."
30 CALL_EXPR@[28; 40)
31 PATH_EXPR@[28; 38)
32 PATH@[28; 38)
33 PATH@[28; 29)
34 PATH_SEGMENT@[28; 29)
35 NAME_REF@[28; 29)
36 IDENT@[28; 29) "S"
37 COLON2@[29; 31) "::"
38 PATH_SEGMENT@[31; 38)
39 NAME_REF@[31; 38)
40 IDENT@[31; 38) "default"
41 ARG_LIST@[38; 40)
42 L_PAREN@[38; 39) "("
43 R_PAREN@[39; 40) ")"
44 WHITESPACE@[40; 41) " "
45 R_CURLY@[41; 42) "}"
46 WHITESPACE@[42; 43) "\n"
47 R_CURLY@[43; 44) "}"
48 WHITESPACE@[44; 45) "\n"
49error [25; 25): expected COLON
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs
new file mode 100644
index 000000000..a4e5b2f69
--- /dev/null
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs
@@ -0,0 +1,3 @@
1fn main() {
2 S { field ..S::default() }
3}
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 f4206858b..89a611799 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
@@ -35,8 +35,11 @@ SOURCE_FILE@[0; 112)
35 L_CURLY@[27; 28) "{" 35 L_CURLY@[27; 28) "{"
36 WHITESPACE@[28; 29) " " 36 WHITESPACE@[28; 29) " "
37 RECORD_FIELD@[29; 30) 37 RECORD_FIELD@[29; 30)
38 NAME_REF@[29; 30) 38 PATH_EXPR@[29; 30)
39 IDENT@[29; 30) "x" 39 PATH@[29; 30)
40 PATH_SEGMENT@[29; 30)
41 NAME_REF@[29; 30)
42 IDENT@[29; 30) "x"
40 COMMA@[30; 31) "," 43 COMMA@[30; 31) ","
41 WHITESPACE@[31; 32) " " 44 WHITESPACE@[31; 32) " "
42 RECORD_FIELD@[32; 37) 45 RECORD_FIELD@[32; 37)
@@ -62,8 +65,11 @@ SOURCE_FILE@[0; 112)
62 L_CURLY@[48; 49) "{" 65 L_CURLY@[48; 49) "{"
63 WHITESPACE@[49; 50) " " 66 WHITESPACE@[49; 50) " "
64 RECORD_FIELD@[50; 51) 67 RECORD_FIELD@[50; 51)
65 NAME_REF@[50; 51) 68 PATH_EXPR@[50; 51)
66 IDENT@[50; 51) "x" 69 PATH@[50; 51)
70 PATH_SEGMENT@[50; 51)
71 NAME_REF@[50; 51)
72 IDENT@[50; 51) "x"
67 COMMA@[51; 52) "," 73 COMMA@[51; 52) ","
68 WHITESPACE@[52; 53) " " 74 WHITESPACE@[52; 53) " "
69 RECORD_FIELD@[53; 58) 75 RECORD_FIELD@[53; 58)
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
index c2614543c..fcd099de9 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0102_record_field_pat_list.rast
@@ -44,18 +44,20 @@ SOURCE_FILE@[0; 119)
44 RECORD_FIELD_PAT_LIST@[40; 56) 44 RECORD_FIELD_PAT_LIST@[40; 56)
45 L_CURLY@[40; 41) "{" 45 L_CURLY@[40; 41) "{"
46 WHITESPACE@[41; 42) " " 46 WHITESPACE@[41; 42) " "
47 BIND_PAT@[42; 43) 47 RECORD_FIELD_PAT@[42; 43)
48 NAME@[42; 43) 48 BIND_PAT@[42; 43)
49 IDENT@[42; 43) "f" 49 NAME@[42; 43)
50 IDENT@[42; 43) "f"
50 COMMA@[43; 44) "," 51 COMMA@[43; 44) ","
51 WHITESPACE@[44; 45) " " 52 WHITESPACE@[44; 45) " "
52 BIND_PAT@[45; 54) 53 RECORD_FIELD_PAT@[45; 54)
53 REF_KW@[45; 48) "ref" 54 BIND_PAT@[45; 54)
54 WHITESPACE@[48; 49) " " 55 REF_KW@[45; 48) "ref"
55 MUT_KW@[49; 52) "mut" 56 WHITESPACE@[48; 49) " "
56 WHITESPACE@[52; 53) " " 57 MUT_KW@[49; 52) "mut"
57 NAME@[53; 54) 58 WHITESPACE@[52; 53) " "
58 IDENT@[53; 54) "g" 59 NAME@[53; 54)
60 IDENT@[53; 54) "g"
59 WHITESPACE@[54; 55) " " 61 WHITESPACE@[54; 55) " "
60 R_CURLY@[55; 56) "}" 62 R_CURLY@[55; 56) "}"
61 WHITESPACE@[56; 57) " " 63 WHITESPACE@[56; 57) " "
@@ -79,7 +81,7 @@ SOURCE_FILE@[0; 119)
79 L_CURLY@[73; 74) "{" 81 L_CURLY@[73; 74) "{"
80 WHITESPACE@[74; 75) " " 82 WHITESPACE@[74; 75) " "
81 RECORD_FIELD_PAT@[75; 79) 83 RECORD_FIELD_PAT@[75; 79)
82 NAME@[75; 76) 84 NAME_REF@[75; 76)
83 IDENT@[75; 76) "h" 85 IDENT@[75; 76) "h"
84 COLON@[76; 77) ":" 86 COLON@[76; 77) ":"
85 WHITESPACE@[77; 78) " " 87 WHITESPACE@[77; 78) " "
@@ -110,7 +112,7 @@ SOURCE_FILE@[0; 119)
110 L_CURLY@[101; 102) "{" 112 L_CURLY@[101; 102) "{"
111 WHITESPACE@[102; 103) " " 113 WHITESPACE@[102; 103) " "
112 RECORD_FIELD_PAT@[103; 107) 114 RECORD_FIELD_PAT@[103; 107)
113 NAME@[103; 104) 115 NAME_REF@[103; 104)
114 IDENT@[103; 104) "h" 116 IDENT@[103; 104) "h"
115 COLON@[104; 105) ":" 117 COLON@[104; 105) ":"
116 WHITESPACE@[105; 106) " " 118 WHITESPACE@[105; 106) " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
index f75673070..1d245f8f3 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0143_box_pat.rast
@@ -44,16 +44,17 @@ SOURCE_FILE@[0; 118)
44 RECORD_FIELD_PAT_LIST@[50; 81) 44 RECORD_FIELD_PAT_LIST@[50; 81)
45 L_CURLY@[50; 51) "{" 45 L_CURLY@[50; 51) "{"
46 WHITESPACE@[51; 52) " " 46 WHITESPACE@[51; 52) " "
47 BOX_PAT@[52; 57) 47 RECORD_FIELD_PAT@[52; 57)
48 BOX_KW@[52; 55) "box" 48 BOX_PAT@[52; 57)
49 WHITESPACE@[55; 56) " " 49 BOX_KW@[52; 55) "box"
50 BIND_PAT@[56; 57) 50 WHITESPACE@[55; 56) " "
51 NAME@[56; 57) 51 BIND_PAT@[56; 57)
52 IDENT@[56; 57) "i" 52 NAME@[56; 57)
53 IDENT@[56; 57) "i"
53 COMMA@[57; 58) "," 54 COMMA@[57; 58) ","
54 WHITESPACE@[58; 59) " " 55 WHITESPACE@[58; 59) " "
55 RECORD_FIELD_PAT@[59; 79) 56 RECORD_FIELD_PAT@[59; 79)
56 NAME@[59; 60) 57 NAME_REF@[59; 60)
57 IDENT@[59; 60) "j" 58 IDENT@[59; 60) "j"
58 COLON@[60; 61) ":" 59 COLON@[60; 61) ":"
59 WHITESPACE@[61; 62) " " 60 WHITESPACE@[61; 62) " "
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
index 0d786f597..cac2ffdcf 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0145_record_field_pat.rast
@@ -25,7 +25,8 @@ SOURCE_FILE@[0; 63)
25 L_CURLY@[21; 22) "{" 25 L_CURLY@[21; 22) "{"
26 WHITESPACE@[22; 23) " " 26 WHITESPACE@[22; 23) " "
27 RECORD_FIELD_PAT@[23; 27) 27 RECORD_FIELD_PAT@[23; 27)
28 INT_NUMBER@[23; 24) "0" 28 NAME_REF@[23; 24)
29 INT_NUMBER@[23; 24) "0"
29 COLON@[24; 25) ":" 30 COLON@[24; 25) ":"
30 WHITESPACE@[25; 26) " " 31 WHITESPACE@[25; 26) " "
31 LITERAL_PAT@[26; 27) 32 LITERAL_PAT@[26; 27)
@@ -54,7 +55,7 @@ SOURCE_FILE@[0; 63)
54 L_CURLY@[46; 47) "{" 55 L_CURLY@[46; 47) "{"
55 WHITESPACE@[47; 48) " " 56 WHITESPACE@[47; 48) " "
56 RECORD_FIELD_PAT@[48; 52) 57 RECORD_FIELD_PAT@[48; 52)
57 NAME@[48; 49) 58 NAME_REF@[48; 49)
58 IDENT@[48; 49) "x" 59 IDENT@[48; 49) "x"
59 COLON@[49; 50) ":" 60 COLON@[49; 50) ":"
60 WHITESPACE@[50; 51) " " 61 WHITESPACE@[50; 51) " "
diff --git a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
index 9b5954ebd..d0623ba90 100644
--- a/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0063_trait_fn_patterns.rast
@@ -68,14 +68,16 @@ SOURCE_FILE@[0; 170)
68 RECORD_FIELD_PAT_LIST@[59; 67) 68 RECORD_FIELD_PAT_LIST@[59; 67)
69 L_CURLY@[59; 60) "{" 69 L_CURLY@[59; 60) "{"
70 WHITESPACE@[60; 61) " " 70 WHITESPACE@[60; 61) " "
71 BIND_PAT@[61; 62) 71 RECORD_FIELD_PAT@[61; 62)
72 NAME@[61; 62) 72 BIND_PAT@[61; 62)
73 IDENT@[61; 62) "a" 73 NAME@[61; 62)
74 IDENT@[61; 62) "a"
74 COMMA@[62; 63) "," 75 COMMA@[62; 63) ","
75 WHITESPACE@[63; 64) " " 76 WHITESPACE@[63; 64) " "
76 BIND_PAT@[64; 65) 77 RECORD_FIELD_PAT@[64; 65)
77 NAME@[64; 65) 78 BIND_PAT@[64; 65)
78 IDENT@[64; 65) "b" 79 NAME@[64; 65)
80 IDENT@[64; 65) "b"
79 WHITESPACE@[65; 66) " " 81 WHITESPACE@[65; 66) " "
80 R_CURLY@[66; 67) "}" 82 R_CURLY@[66; 67) "}"
81 COLON@[67; 68) ":" 83 COLON@[67; 68) ":"
diff --git a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
index b30030de3..5e96b695b 100644
--- a/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0064_impl_fn_params.rast
@@ -71,14 +71,16 @@ SOURCE_FILE@[0; 137)
71 RECORD_FIELD_PAT_LIST@[58; 66) 71 RECORD_FIELD_PAT_LIST@[58; 66)
72 L_CURLY@[58; 59) "{" 72 L_CURLY@[58; 59) "{"
73 WHITESPACE@[59; 60) " " 73 WHITESPACE@[59; 60) " "
74 BIND_PAT@[60; 61) 74 RECORD_FIELD_PAT@[60; 61)
75 NAME@[60; 61) 75 BIND_PAT@[60; 61)
76 IDENT@[60; 61) "a" 76 NAME@[60; 61)
77 IDENT@[60; 61) "a"
77 COMMA@[61; 62) "," 78 COMMA@[61; 62) ","
78 WHITESPACE@[62; 63) " " 79 WHITESPACE@[62; 63) " "
79 BIND_PAT@[63; 64) 80 RECORD_FIELD_PAT@[63; 64)
80 NAME@[63; 64) 81 BIND_PAT@[63; 64)
81 IDENT@[63; 64) "b" 82 NAME@[63; 64)
83 IDENT@[63; 64) "b"
82 WHITESPACE@[64; 65) " " 84 WHITESPACE@[64; 65) " "
83 R_CURLY@[65; 66) "}" 85 R_CURLY@[65; 66) "}"
84 COLON@[66; 67) ":" 86 COLON@[66; 67) ":"