diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-11 23:01:22 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-11 23:01:22 +0100 |
commit | a8e032820f14cad3630299a1ae16c62dcf59f358 (patch) | |
tree | 4438f81bdbf88d694b14c3c448c5bb21c8541091 /crates/ra_syntax/test_data | |
parent | f13da3f895d9d401ff467a6c1fa33a4adf09fe2c (diff) | |
parent | 5e5eb6a108b00c573455d8d088742592012707be (diff) |
Merge #3955
3955: Align grammar for record patterns and literals r=matklad a=matklad
The grammar now looks like this
[name_ref :] pat
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data')
5 files changed, 41 insertions, 33 deletions
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) ":" |