diff options
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline')
6 files changed, 48 insertions, 116 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs deleted file mode 100644 index f59e13771..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.rs +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | pub const A: &[i64] = &[ | ||
2 | #[cfg(test)] | ||
3 | 1, | ||
4 | 2, | ||
5 | ]; | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt deleted file mode 100644 index 8f2e91bdf..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0135_first_array_member_attributes.txt +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 56) | ||
2 | CONST_DEF@[0; 55) | ||
3 | VISIBILITY@[0; 3) | ||
4 | PUB_KW@[0; 3) "pub" | ||
5 | WHITESPACE@[3; 4) " " | ||
6 | CONST_KW@[4; 9) "const" | ||
7 | WHITESPACE@[9; 10) " " | ||
8 | NAME@[10; 11) | ||
9 | IDENT@[10; 11) "A" | ||
10 | COLON@[11; 12) ":" | ||
11 | WHITESPACE@[12; 13) " " | ||
12 | REFERENCE_TYPE@[13; 19) | ||
13 | AMP@[13; 14) "&" | ||
14 | SLICE_TYPE@[14; 19) | ||
15 | L_BRACK@[14; 15) "[" | ||
16 | PATH_TYPE@[15; 18) | ||
17 | PATH@[15; 18) | ||
18 | PATH_SEGMENT@[15; 18) | ||
19 | NAME_REF@[15; 18) | ||
20 | IDENT@[15; 18) "i64" | ||
21 | R_BRACK@[18; 19) "]" | ||
22 | WHITESPACE@[19; 20) " " | ||
23 | EQ@[20; 21) "=" | ||
24 | WHITESPACE@[21; 22) " " | ||
25 | REF_EXPR@[22; 54) | ||
26 | AMP@[22; 23) "&" | ||
27 | ARRAY_EXPR@[23; 54) | ||
28 | L_BRACK@[23; 24) "[" | ||
29 | WHITESPACE@[24; 28) "\n " | ||
30 | ATTR@[28; 40) | ||
31 | POUND@[28; 29) "#" | ||
32 | L_BRACK@[29; 30) "[" | ||
33 | PATH@[30; 33) | ||
34 | PATH_SEGMENT@[30; 33) | ||
35 | NAME_REF@[30; 33) | ||
36 | IDENT@[30; 33) "cfg" | ||
37 | TOKEN_TREE@[33; 39) | ||
38 | L_PAREN@[33; 34) "(" | ||
39 | IDENT@[34; 38) "test" | ||
40 | R_PAREN@[38; 39) ")" | ||
41 | R_BRACK@[39; 40) "]" | ||
42 | WHITESPACE@[40; 44) "\n " | ||
43 | LITERAL@[44; 45) | ||
44 | INT_NUMBER@[44; 45) "1" | ||
45 | COMMA@[45; 46) "," | ||
46 | WHITESPACE@[46; 50) "\n " | ||
47 | LITERAL@[50; 51) | ||
48 | INT_NUMBER@[50; 51) "2" | ||
49 | COMMA@[51; 52) "," | ||
50 | WHITESPACE@[52; 53) "\n" | ||
51 | R_BRACK@[53; 54) "]" | ||
52 | SEMI@[54; 55) ";" | ||
53 | WHITESPACE@[55; 56) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs deleted file mode 100644 index 1324acb3f..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.rs +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | pub const A: &[i64] = &[ | ||
2 | 1, | ||
3 | #[cfg(test)] | ||
4 | 2, | ||
5 | ]; | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt deleted file mode 100644 index 41914eb8e..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0136_subsequent_array_member_attributes.txt +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | SOURCE_FILE@[0; 56) | ||
2 | CONST_DEF@[0; 55) | ||
3 | VISIBILITY@[0; 3) | ||
4 | PUB_KW@[0; 3) "pub" | ||
5 | WHITESPACE@[3; 4) " " | ||
6 | CONST_KW@[4; 9) "const" | ||
7 | WHITESPACE@[9; 10) " " | ||
8 | NAME@[10; 11) | ||
9 | IDENT@[10; 11) "A" | ||
10 | COLON@[11; 12) ":" | ||
11 | WHITESPACE@[12; 13) " " | ||
12 | REFERENCE_TYPE@[13; 19) | ||
13 | AMP@[13; 14) "&" | ||
14 | SLICE_TYPE@[14; 19) | ||
15 | L_BRACK@[14; 15) "[" | ||
16 | PATH_TYPE@[15; 18) | ||
17 | PATH@[15; 18) | ||
18 | PATH_SEGMENT@[15; 18) | ||
19 | NAME_REF@[15; 18) | ||
20 | IDENT@[15; 18) "i64" | ||
21 | R_BRACK@[18; 19) "]" | ||
22 | WHITESPACE@[19; 20) " " | ||
23 | EQ@[20; 21) "=" | ||
24 | WHITESPACE@[21; 22) " " | ||
25 | REF_EXPR@[22; 54) | ||
26 | AMP@[22; 23) "&" | ||
27 | ARRAY_EXPR@[23; 54) | ||
28 | L_BRACK@[23; 24) "[" | ||
29 | WHITESPACE@[24; 28) "\n " | ||
30 | LITERAL@[28; 29) | ||
31 | INT_NUMBER@[28; 29) "1" | ||
32 | COMMA@[29; 30) "," | ||
33 | WHITESPACE@[30; 34) "\n " | ||
34 | ATTR@[34; 46) | ||
35 | POUND@[34; 35) "#" | ||
36 | L_BRACK@[35; 36) "[" | ||
37 | PATH@[36; 39) | ||
38 | PATH_SEGMENT@[36; 39) | ||
39 | NAME_REF@[36; 39) | ||
40 | IDENT@[36; 39) "cfg" | ||
41 | TOKEN_TREE@[39; 45) | ||
42 | L_PAREN@[39; 40) "(" | ||
43 | IDENT@[40; 44) "test" | ||
44 | R_PAREN@[44; 45) ")" | ||
45 | R_BRACK@[45; 46) "]" | ||
46 | WHITESPACE@[46; 50) "\n " | ||
47 | LITERAL@[50; 51) | ||
48 | INT_NUMBER@[50; 51) "2" | ||
49 | COMMA@[51; 52) "," | ||
50 | WHITESPACE@[52; 53) "\n" | ||
51 | R_BRACK@[53; 54) "]" | ||
52 | SEMI@[54; 55) ";" | ||
53 | WHITESPACE@[55; 56) "\n" | ||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rs b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rs new file mode 100644 index 000000000..2ac310924 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.rs | |||
@@ -0,0 +1 @@ | |||
const A: &[i64] = &[1, #[cfg(test)] 2]; | |||
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.txt b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.txt new file mode 100644 index 000000000..78e296f88 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0150_array_attrs.txt | |||
@@ -0,0 +1,47 @@ | |||
1 | SOURCE_FILE@[0; 40) | ||
2 | CONST_DEF@[0; 39) | ||
3 | CONST_KW@[0; 5) "const" | ||
4 | WHITESPACE@[5; 6) " " | ||
5 | NAME@[6; 7) | ||
6 | IDENT@[6; 7) "A" | ||
7 | COLON@[7; 8) ":" | ||
8 | WHITESPACE@[8; 9) " " | ||
9 | REFERENCE_TYPE@[9; 15) | ||
10 | AMP@[9; 10) "&" | ||
11 | SLICE_TYPE@[10; 15) | ||
12 | L_BRACK@[10; 11) "[" | ||
13 | PATH_TYPE@[11; 14) | ||
14 | PATH@[11; 14) | ||
15 | PATH_SEGMENT@[11; 14) | ||
16 | NAME_REF@[11; 14) | ||
17 | IDENT@[11; 14) "i64" | ||
18 | R_BRACK@[14; 15) "]" | ||
19 | WHITESPACE@[15; 16) " " | ||
20 | EQ@[16; 17) "=" | ||
21 | WHITESPACE@[17; 18) " " | ||
22 | REF_EXPR@[18; 38) | ||
23 | AMP@[18; 19) "&" | ||
24 | ARRAY_EXPR@[19; 38) | ||
25 | L_BRACK@[19; 20) "[" | ||
26 | LITERAL@[20; 21) | ||
27 | INT_NUMBER@[20; 21) "1" | ||
28 | COMMA@[21; 22) "," | ||
29 | WHITESPACE@[22; 23) " " | ||
30 | LITERAL@[23; 37) | ||
31 | ATTR@[23; 35) | ||
32 | POUND@[23; 24) "#" | ||
33 | L_BRACK@[24; 25) "[" | ||
34 | PATH@[25; 28) | ||
35 | PATH_SEGMENT@[25; 28) | ||
36 | NAME_REF@[25; 28) | ||
37 | IDENT@[25; 28) "cfg" | ||
38 | TOKEN_TREE@[28; 34) | ||
39 | L_PAREN@[28; 29) "(" | ||
40 | IDENT@[29; 33) "test" | ||
41 | R_PAREN@[33; 34) ")" | ||
42 | R_BRACK@[34; 35) "]" | ||
43 | WHITESPACE@[35; 36) " " | ||
44 | INT_NUMBER@[36; 37) "2" | ||
45 | R_BRACK@[37; 38) "]" | ||
46 | SEMI@[38; 39) ";" | ||
47 | WHITESPACE@[39; 40) "\n" | ||