diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline')
10 files changed, 49 insertions, 389 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt index a0a8aea76..4c17f0db8 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.txt | |||
@@ -81,7 +81,8 @@ SOURCE_FILE@[0; 113) | |||
81 | WHITESPACE@[97; 98) " " | 81 | WHITESPACE@[97; 98) " " |
82 | COMMA@[98; 99) "," | 82 | COMMA@[98; 99) "," |
83 | WHITESPACE@[99; 100) " " | 83 | WHITESPACE@[99; 100) " " |
84 | DOTDOTDOT@[100; 103) "..." | 84 | PARAM@[100; 103) |
85 | DOTDOTDOT@[100; 103) "..." | ||
85 | WHITESPACE@[103; 104) " " | 86 | WHITESPACE@[103; 104) " " |
86 | R_PAREN@[104; 105) ")" | 87 | R_PAREN@[104; 105) ")" |
87 | WHITESPACE@[105; 106) " " | 88 | WHITESPACE@[105; 106) " " |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs deleted file mode 100644 index 472cb8803..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.rs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | trait Foo { | ||
2 | fn bar(_: u64, mut x: i32); | ||
3 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt b/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt deleted file mode 100644 index 158236c5a..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0116_trait_fn_placeholder_parameter.txt +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 46) | ||
2 | TRAIT_DEF@[0; 45) | ||
3 | TRAIT_KW@[0; 5) "trait" | ||
4 | WHITESPACE@[5; 6) " " | ||
5 | NAME@[6; 9) | ||
6 | IDENT@[6; 9) "Foo" | ||
7 | WHITESPACE@[9; 10) " " | ||
8 | ITEM_LIST@[10; 45) | ||
9 | L_CURLY@[10; 11) "{" | ||
10 | WHITESPACE@[11; 16) "\n " | ||
11 | FN_DEF@[16; 43) | ||
12 | FN_KW@[16; 18) "fn" | ||
13 | WHITESPACE@[18; 19) " " | ||
14 | NAME@[19; 22) | ||
15 | IDENT@[19; 22) "bar" | ||
16 | PARAM_LIST@[22; 42) | ||
17 | L_PAREN@[22; 23) "(" | ||
18 | PARAM@[23; 29) | ||
19 | PLACEHOLDER_PAT@[23; 24) | ||
20 | UNDERSCORE@[23; 24) "_" | ||
21 | COLON@[24; 25) ":" | ||
22 | WHITESPACE@[25; 26) " " | ||
23 | PATH_TYPE@[26; 29) | ||
24 | PATH@[26; 29) | ||
25 | PATH_SEGMENT@[26; 29) | ||
26 | NAME_REF@[26; 29) | ||
27 | IDENT@[26; 29) "u64" | ||
28 | COMMA@[29; 30) "," | ||
29 | WHITESPACE@[30; 31) " " | ||
30 | PARAM@[31; 41) | ||
31 | BIND_PAT@[31; 36) | ||
32 | MUT_KW@[31; 34) "mut" | ||
33 | WHITESPACE@[34; 35) " " | ||
34 | NAME@[35; 36) | ||
35 | IDENT@[35; 36) "x" | ||
36 | COLON@[36; 37) ":" | ||
37 | WHITESPACE@[37; 38) " " | ||
38 | PATH_TYPE@[38; 41) | ||
39 | PATH@[38; 41) | ||
40 | PATH_SEGMENT@[38; 41) | ||
41 | NAME_REF@[38; 41) | ||
42 | IDENT@[38; 41) "i32" | ||
43 | R_PAREN@[41; 42) ")" | ||
44 | SEMI@[42; 43) ";" | ||
45 | WHITESPACE@[43; 44) "\n" | ||
46 | R_CURLY@[44; 45) "}" | ||
47 | WHITESPACE@[45; 46) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt index 836e8e55b..6c3b17868 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0123_param_list_vararg.txt | |||
@@ -32,7 +32,8 @@ SOURCE_FILE@[0; 57) | |||
32 | IDENT@[38; 40) "i8" | 32 | IDENT@[38; 40) "i8" |
33 | COMMA@[40; 41) "," | 33 | COMMA@[40; 41) "," |
34 | WHITESPACE@[41; 42) " " | 34 | WHITESPACE@[41; 42) " " |
35 | DOTDOTDOT@[42; 45) "..." | 35 | PARAM@[42; 45) |
36 | DOTDOTDOT@[42; 45) "..." | ||
36 | R_PAREN@[45; 46) ")" | 37 | R_PAREN@[45; 46) ")" |
37 | WHITESPACE@[46; 47) " " | 38 | WHITESPACE@[46; 47) " " |
38 | RET_TYPE@[47; 53) | 39 | RET_TYPE@[47; 53) |
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs deleted file mode 100644 index b49e872d7..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.rs +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | impl U { | ||
2 | fn f1((a, b): (usize, usize)) {} | ||
3 | fn f2(S { a, b }: S) {} | ||
4 | fn f3(NewType(a): NewType) {} | ||
5 | fn f4(&&a: &&usize) {} | ||
6 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt deleted file mode 100644 index b30030de3..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 137) | ||
2 | IMPL_DEF@[0; 136) | ||
3 | IMPL_KW@[0; 4) "impl" | ||
4 | WHITESPACE@[4; 5) " " | ||
5 | PATH_TYPE@[5; 6) | ||
6 | PATH@[5; 6) | ||
7 | PATH_SEGMENT@[5; 6) | ||
8 | NAME_REF@[5; 6) | ||
9 | IDENT@[5; 6) "U" | ||
10 | WHITESPACE@[6; 7) " " | ||
11 | ITEM_LIST@[7; 136) | ||
12 | L_CURLY@[7; 8) "{" | ||
13 | WHITESPACE@[8; 13) "\n " | ||
14 | FN_DEF@[13; 45) | ||
15 | FN_KW@[13; 15) "fn" | ||
16 | WHITESPACE@[15; 16) " " | ||
17 | NAME@[16; 18) | ||
18 | IDENT@[16; 18) "f1" | ||
19 | PARAM_LIST@[18; 42) | ||
20 | L_PAREN@[18; 19) "(" | ||
21 | PARAM@[19; 41) | ||
22 | TUPLE_PAT@[19; 25) | ||
23 | L_PAREN@[19; 20) "(" | ||
24 | BIND_PAT@[20; 21) | ||
25 | NAME@[20; 21) | ||
26 | IDENT@[20; 21) "a" | ||
27 | COMMA@[21; 22) "," | ||
28 | WHITESPACE@[22; 23) " " | ||
29 | BIND_PAT@[23; 24) | ||
30 | NAME@[23; 24) | ||
31 | IDENT@[23; 24) "b" | ||
32 | R_PAREN@[24; 25) ")" | ||
33 | COLON@[25; 26) ":" | ||
34 | WHITESPACE@[26; 27) " " | ||
35 | TUPLE_TYPE@[27; 41) | ||
36 | L_PAREN@[27; 28) "(" | ||
37 | PATH_TYPE@[28; 33) | ||
38 | PATH@[28; 33) | ||
39 | PATH_SEGMENT@[28; 33) | ||
40 | NAME_REF@[28; 33) | ||
41 | IDENT@[28; 33) "usize" | ||
42 | COMMA@[33; 34) "," | ||
43 | WHITESPACE@[34; 35) " " | ||
44 | PATH_TYPE@[35; 40) | ||
45 | PATH@[35; 40) | ||
46 | PATH_SEGMENT@[35; 40) | ||
47 | NAME_REF@[35; 40) | ||
48 | IDENT@[35; 40) "usize" | ||
49 | R_PAREN@[40; 41) ")" | ||
50 | R_PAREN@[41; 42) ")" | ||
51 | WHITESPACE@[42; 43) " " | ||
52 | BLOCK_EXPR@[43; 45) | ||
53 | BLOCK@[43; 45) | ||
54 | L_CURLY@[43; 44) "{" | ||
55 | R_CURLY@[44; 45) "}" | ||
56 | WHITESPACE@[45; 50) "\n " | ||
57 | FN_DEF@[50; 73) | ||
58 | FN_KW@[50; 52) "fn" | ||
59 | WHITESPACE@[52; 53) " " | ||
60 | NAME@[53; 55) | ||
61 | IDENT@[53; 55) "f2" | ||
62 | PARAM_LIST@[55; 70) | ||
63 | L_PAREN@[55; 56) "(" | ||
64 | PARAM@[56; 69) | ||
65 | RECORD_PAT@[56; 66) | ||
66 | PATH@[56; 57) | ||
67 | PATH_SEGMENT@[56; 57) | ||
68 | NAME_REF@[56; 57) | ||
69 | IDENT@[56; 57) "S" | ||
70 | WHITESPACE@[57; 58) " " | ||
71 | RECORD_FIELD_PAT_LIST@[58; 66) | ||
72 | L_CURLY@[58; 59) "{" | ||
73 | WHITESPACE@[59; 60) " " | ||
74 | BIND_PAT@[60; 61) | ||
75 | NAME@[60; 61) | ||
76 | IDENT@[60; 61) "a" | ||
77 | COMMA@[61; 62) "," | ||
78 | WHITESPACE@[62; 63) " " | ||
79 | BIND_PAT@[63; 64) | ||
80 | NAME@[63; 64) | ||
81 | IDENT@[63; 64) "b" | ||
82 | WHITESPACE@[64; 65) " " | ||
83 | R_CURLY@[65; 66) "}" | ||
84 | COLON@[66; 67) ":" | ||
85 | WHITESPACE@[67; 68) " " | ||
86 | PATH_TYPE@[68; 69) | ||
87 | PATH@[68; 69) | ||
88 | PATH_SEGMENT@[68; 69) | ||
89 | NAME_REF@[68; 69) | ||
90 | IDENT@[68; 69) "S" | ||
91 | R_PAREN@[69; 70) ")" | ||
92 | WHITESPACE@[70; 71) " " | ||
93 | BLOCK_EXPR@[71; 73) | ||
94 | BLOCK@[71; 73) | ||
95 | L_CURLY@[71; 72) "{" | ||
96 | R_CURLY@[72; 73) "}" | ||
97 | WHITESPACE@[73; 78) "\n " | ||
98 | FN_DEF@[78; 107) | ||
99 | FN_KW@[78; 80) "fn" | ||
100 | WHITESPACE@[80; 81) " " | ||
101 | NAME@[81; 83) | ||
102 | IDENT@[81; 83) "f3" | ||
103 | PARAM_LIST@[83; 104) | ||
104 | L_PAREN@[83; 84) "(" | ||
105 | PARAM@[84; 103) | ||
106 | TUPLE_STRUCT_PAT@[84; 94) | ||
107 | PATH@[84; 91) | ||
108 | PATH_SEGMENT@[84; 91) | ||
109 | NAME_REF@[84; 91) | ||
110 | IDENT@[84; 91) "NewType" | ||
111 | L_PAREN@[91; 92) "(" | ||
112 | BIND_PAT@[92; 93) | ||
113 | NAME@[92; 93) | ||
114 | IDENT@[92; 93) "a" | ||
115 | R_PAREN@[93; 94) ")" | ||
116 | COLON@[94; 95) ":" | ||
117 | WHITESPACE@[95; 96) " " | ||
118 | PATH_TYPE@[96; 103) | ||
119 | PATH@[96; 103) | ||
120 | PATH_SEGMENT@[96; 103) | ||
121 | NAME_REF@[96; 103) | ||
122 | IDENT@[96; 103) "NewType" | ||
123 | R_PAREN@[103; 104) ")" | ||
124 | WHITESPACE@[104; 105) " " | ||
125 | BLOCK_EXPR@[105; 107) | ||
126 | BLOCK@[105; 107) | ||
127 | L_CURLY@[105; 106) "{" | ||
128 | R_CURLY@[106; 107) "}" | ||
129 | WHITESPACE@[107; 112) "\n " | ||
130 | FN_DEF@[112; 134) | ||
131 | FN_KW@[112; 114) "fn" | ||
132 | WHITESPACE@[114; 115) " " | ||
133 | NAME@[115; 117) | ||
134 | IDENT@[115; 117) "f4" | ||
135 | PARAM_LIST@[117; 131) | ||
136 | L_PAREN@[117; 118) "(" | ||
137 | PARAM@[118; 130) | ||
138 | REF_PAT@[118; 121) | ||
139 | AMP@[118; 119) "&" | ||
140 | REF_PAT@[119; 121) | ||
141 | AMP@[119; 120) "&" | ||
142 | BIND_PAT@[120; 121) | ||
143 | NAME@[120; 121) | ||
144 | IDENT@[120; 121) "a" | ||
145 | COLON@[121; 122) ":" | ||
146 | WHITESPACE@[122; 123) " " | ||
147 | REFERENCE_TYPE@[123; 130) | ||
148 | AMP@[123; 124) "&" | ||
149 | REFERENCE_TYPE@[124; 130) | ||
150 | AMP@[124; 125) "&" | ||
151 | PATH_TYPE@[125; 130) | ||
152 | PATH@[125; 130) | ||
153 | PATH_SEGMENT@[125; 130) | ||
154 | NAME_REF@[125; 130) | ||
155 | IDENT@[125; 130) "usize" | ||
156 | R_PAREN@[130; 131) ")" | ||
157 | WHITESPACE@[131; 132) " " | ||
158 | BLOCK_EXPR@[132; 134) | ||
159 | BLOCK@[132; 134) | ||
160 | L_CURLY@[132; 133) "{" | ||
161 | R_CURLY@[133; 134) "}" | ||
162 | WHITESPACE@[134; 135) "\n" | ||
163 | R_CURLY@[135; 136) "}" | ||
164 | WHITESPACE@[136; 137) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs deleted file mode 100644 index a94bf378a..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.rs +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | trait T { | ||
2 | fn f1((a, b): (usize, usize)) {} | ||
3 | fn f2(S { a, b }: S) {} | ||
4 | fn f3(NewType(a): NewType) {} | ||
5 | fn f4(&&a: &&usize) {} | ||
6 | } | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt deleted file mode 100644 index b22df8dbe..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0153_trait_fn_patterns.txt +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 138) | ||
2 | TRAIT_DEF@[0; 137) | ||
3 | TRAIT_KW@[0; 5) "trait" | ||
4 | WHITESPACE@[5; 6) " " | ||
5 | NAME@[6; 7) | ||
6 | IDENT@[6; 7) "T" | ||
7 | WHITESPACE@[7; 8) " " | ||
8 | ITEM_LIST@[8; 137) | ||
9 | L_CURLY@[8; 9) "{" | ||
10 | WHITESPACE@[9; 14) "\n " | ||
11 | FN_DEF@[14; 46) | ||
12 | FN_KW@[14; 16) "fn" | ||
13 | WHITESPACE@[16; 17) " " | ||
14 | NAME@[17; 19) | ||
15 | IDENT@[17; 19) "f1" | ||
16 | PARAM_LIST@[19; 43) | ||
17 | L_PAREN@[19; 20) "(" | ||
18 | PARAM@[20; 42) | ||
19 | TUPLE_PAT@[20; 26) | ||
20 | L_PAREN@[20; 21) "(" | ||
21 | BIND_PAT@[21; 22) | ||
22 | NAME@[21; 22) | ||
23 | IDENT@[21; 22) "a" | ||
24 | COMMA@[22; 23) "," | ||
25 | WHITESPACE@[23; 24) " " | ||
26 | BIND_PAT@[24; 25) | ||
27 | NAME@[24; 25) | ||
28 | IDENT@[24; 25) "b" | ||
29 | R_PAREN@[25; 26) ")" | ||
30 | COLON@[26; 27) ":" | ||
31 | WHITESPACE@[27; 28) " " | ||
32 | TUPLE_TYPE@[28; 42) | ||
33 | L_PAREN@[28; 29) "(" | ||
34 | PATH_TYPE@[29; 34) | ||
35 | PATH@[29; 34) | ||
36 | PATH_SEGMENT@[29; 34) | ||
37 | NAME_REF@[29; 34) | ||
38 | IDENT@[29; 34) "usize" | ||
39 | COMMA@[34; 35) "," | ||
40 | WHITESPACE@[35; 36) " " | ||
41 | PATH_TYPE@[36; 41) | ||
42 | PATH@[36; 41) | ||
43 | PATH_SEGMENT@[36; 41) | ||
44 | NAME_REF@[36; 41) | ||
45 | IDENT@[36; 41) "usize" | ||
46 | R_PAREN@[41; 42) ")" | ||
47 | R_PAREN@[42; 43) ")" | ||
48 | WHITESPACE@[43; 44) " " | ||
49 | BLOCK_EXPR@[44; 46) | ||
50 | BLOCK@[44; 46) | ||
51 | L_CURLY@[44; 45) "{" | ||
52 | R_CURLY@[45; 46) "}" | ||
53 | WHITESPACE@[46; 51) "\n " | ||
54 | FN_DEF@[51; 74) | ||
55 | FN_KW@[51; 53) "fn" | ||
56 | WHITESPACE@[53; 54) " " | ||
57 | NAME@[54; 56) | ||
58 | IDENT@[54; 56) "f2" | ||
59 | PARAM_LIST@[56; 71) | ||
60 | L_PAREN@[56; 57) "(" | ||
61 | PARAM@[57; 70) | ||
62 | RECORD_PAT@[57; 67) | ||
63 | PATH@[57; 58) | ||
64 | PATH_SEGMENT@[57; 58) | ||
65 | NAME_REF@[57; 58) | ||
66 | IDENT@[57; 58) "S" | ||
67 | WHITESPACE@[58; 59) " " | ||
68 | RECORD_FIELD_PAT_LIST@[59; 67) | ||
69 | L_CURLY@[59; 60) "{" | ||
70 | WHITESPACE@[60; 61) " " | ||
71 | BIND_PAT@[61; 62) | ||
72 | NAME@[61; 62) | ||
73 | IDENT@[61; 62) "a" | ||
74 | COMMA@[62; 63) "," | ||
75 | WHITESPACE@[63; 64) " " | ||
76 | BIND_PAT@[64; 65) | ||
77 | NAME@[64; 65) | ||
78 | IDENT@[64; 65) "b" | ||
79 | WHITESPACE@[65; 66) " " | ||
80 | R_CURLY@[66; 67) "}" | ||
81 | COLON@[67; 68) ":" | ||
82 | WHITESPACE@[68; 69) " " | ||
83 | PATH_TYPE@[69; 70) | ||
84 | PATH@[69; 70) | ||
85 | PATH_SEGMENT@[69; 70) | ||
86 | NAME_REF@[69; 70) | ||
87 | IDENT@[69; 70) "S" | ||
88 | R_PAREN@[70; 71) ")" | ||
89 | WHITESPACE@[71; 72) " " | ||
90 | BLOCK_EXPR@[72; 74) | ||
91 | BLOCK@[72; 74) | ||
92 | L_CURLY@[72; 73) "{" | ||
93 | R_CURLY@[73; 74) "}" | ||
94 | WHITESPACE@[74; 79) "\n " | ||
95 | FN_DEF@[79; 108) | ||
96 | FN_KW@[79; 81) "fn" | ||
97 | WHITESPACE@[81; 82) " " | ||
98 | NAME@[82; 84) | ||
99 | IDENT@[82; 84) "f3" | ||
100 | PARAM_LIST@[84; 105) | ||
101 | L_PAREN@[84; 85) "(" | ||
102 | PARAM@[85; 104) | ||
103 | TUPLE_STRUCT_PAT@[85; 95) | ||
104 | PATH@[85; 92) | ||
105 | PATH_SEGMENT@[85; 92) | ||
106 | NAME_REF@[85; 92) | ||
107 | IDENT@[85; 92) "NewType" | ||
108 | L_PAREN@[92; 93) "(" | ||
109 | BIND_PAT@[93; 94) | ||
110 | NAME@[93; 94) | ||
111 | IDENT@[93; 94) "a" | ||
112 | R_PAREN@[94; 95) ")" | ||
113 | COLON@[95; 96) ":" | ||
114 | WHITESPACE@[96; 97) " " | ||
115 | PATH_TYPE@[97; 104) | ||
116 | PATH@[97; 104) | ||
117 | PATH_SEGMENT@[97; 104) | ||
118 | NAME_REF@[97; 104) | ||
119 | IDENT@[97; 104) "NewType" | ||
120 | R_PAREN@[104; 105) ")" | ||
121 | WHITESPACE@[105; 106) " " | ||
122 | BLOCK_EXPR@[106; 108) | ||
123 | BLOCK@[106; 108) | ||
124 | L_CURLY@[106; 107) "{" | ||
125 | R_CURLY@[107; 108) "}" | ||
126 | WHITESPACE@[108; 113) "\n " | ||
127 | FN_DEF@[113; 135) | ||
128 | FN_KW@[113; 115) "fn" | ||
129 | WHITESPACE@[115; 116) " " | ||
130 | NAME@[116; 118) | ||
131 | IDENT@[116; 118) "f4" | ||
132 | PARAM_LIST@[118; 132) | ||
133 | L_PAREN@[118; 119) "(" | ||
134 | PARAM@[119; 131) | ||
135 | REF_PAT@[119; 122) | ||
136 | AMP@[119; 120) "&" | ||
137 | REF_PAT@[120; 122) | ||
138 | AMP@[120; 121) "&" | ||
139 | BIND_PAT@[121; 122) | ||
140 | NAME@[121; 122) | ||
141 | IDENT@[121; 122) "a" | ||
142 | COLON@[122; 123) ":" | ||
143 | WHITESPACE@[123; 124) " " | ||
144 | REFERENCE_TYPE@[124; 131) | ||
145 | AMP@[124; 125) "&" | ||
146 | REFERENCE_TYPE@[125; 131) | ||
147 | AMP@[125; 126) "&" | ||
148 | PATH_TYPE@[126; 131) | ||
149 | PATH@[126; 131) | ||
150 | PATH_SEGMENT@[126; 131) | ||
151 | NAME_REF@[126; 131) | ||
152 | IDENT@[126; 131) "usize" | ||
153 | R_PAREN@[131; 132) ")" | ||
154 | WHITESPACE@[132; 133) " " | ||
155 | BLOCK_EXPR@[133; 135) | ||
156 | BLOCK@[133; 135) | ||
157 | L_CURLY@[133; 134) "{" | ||
158 | R_CURLY@[134; 135) "}" | ||
159 | WHITESPACE@[135; 136) "\n" | ||
160 | R_CURLY@[136; 137) "}" | ||
161 | WHITESPACE@[137; 138) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs new file mode 100644 index 000000000..7b277c16b --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.rs | |||
@@ -0,0 +1 @@ | |||
fn foo((x, y): (i32, i32)) {} | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt new file mode 100644 index 000000000..103e254a6 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0156_fn_def_param.txt | |||
@@ -0,0 +1,44 @@ | |||
1 | SOURCE_FILE@[0; 30) | ||
2 | FN_DEF@[0; 29) | ||
3 | FN_KW@[0; 2) "fn" | ||
4 | WHITESPACE@[2; 3) " " | ||
5 | NAME@[3; 6) | ||
6 | IDENT@[3; 6) "foo" | ||
7 | PARAM_LIST@[6; 26) | ||
8 | L_PAREN@[6; 7) "(" | ||
9 | PARAM@[7; 25) | ||
10 | TUPLE_PAT@[7; 13) | ||
11 | L_PAREN@[7; 8) "(" | ||
12 | BIND_PAT@[8; 9) | ||
13 | NAME@[8; 9) | ||
14 | IDENT@[8; 9) "x" | ||
15 | COMMA@[9; 10) "," | ||
16 | WHITESPACE@[10; 11) " " | ||
17 | BIND_PAT@[11; 12) | ||
18 | NAME@[11; 12) | ||
19 | IDENT@[11; 12) "y" | ||
20 | R_PAREN@[12; 13) ")" | ||
21 | COLON@[13; 14) ":" | ||
22 | WHITESPACE@[14; 15) " " | ||
23 | TUPLE_TYPE@[15; 25) | ||
24 | L_PAREN@[15; 16) "(" | ||
25 | PATH_TYPE@[16; 19) | ||
26 | PATH@[16; 19) | ||
27 | PATH_SEGMENT@[16; 19) | ||
28 | NAME_REF@[16; 19) | ||
29 | IDENT@[16; 19) "i32" | ||
30 | COMMA@[19; 20) "," | ||
31 | WHITESPACE@[20; 21) " " | ||
32 | PATH_TYPE@[21; 24) | ||
33 | PATH@[21; 24) | ||
34 | PATH_SEGMENT@[21; 24) | ||
35 | NAME_REF@[21; 24) | ||
36 | IDENT@[21; 24) "i32" | ||
37 | R_PAREN@[24; 25) ")" | ||
38 | R_PAREN@[25; 26) ")" | ||
39 | WHITESPACE@[26; 27) " " | ||
40 | BLOCK_EXPR@[27; 29) | ||
41 | BLOCK@[27; 29) | ||
42 | L_CURLY@[27; 28) "{" | ||
43 | R_CURLY@[28; 29) "}" | ||
44 | WHITESPACE@[29; 30) "\n" | ||