diff options
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs | 3 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt | 45 |
2 files changed, 48 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs new file mode 100644 index 000000000..a6c7760c7 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | fn main() { | ||
2 | S { #[cfg(test)] field: 1 } | ||
3 | } | ||
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt new file mode 100644 index 000000000..34c80500a --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0125_struct_literal_field_with_attr.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | SOURCE_FILE@[0; 46) | ||
2 | FN_DEF@[0; 45) | ||
3 | FN_KW@[0; 2) | ||
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@[10; 45) | ||
12 | L_CURLY@[10; 11) | ||
13 | WHITESPACE@[11; 16) | ||
14 | STRUCT_LIT@[16; 43) | ||
15 | PATH@[16; 17) | ||
16 | PATH_SEGMENT@[16; 17) | ||
17 | NAME_REF@[16; 17) | ||
18 | IDENT@[16; 17) "S" | ||
19 | WHITESPACE@[17; 18) | ||
20 | NAMED_FIELD_LIST@[18; 43) | ||
21 | L_CURLY@[18; 19) | ||
22 | WHITESPACE@[19; 20) | ||
23 | NAMED_FIELD@[20; 41) | ||
24 | ATTR@[20; 32) | ||
25 | POUND@[20; 21) | ||
26 | TOKEN_TREE@[21; 32) | ||
27 | L_BRACK@[21; 22) | ||
28 | IDENT@[22; 25) "cfg" | ||
29 | TOKEN_TREE@[25; 31) | ||
30 | L_PAREN@[25; 26) | ||
31 | IDENT@[26; 30) "test" | ||
32 | R_PAREN@[30; 31) | ||
33 | R_BRACK@[31; 32) | ||
34 | WHITESPACE@[32; 33) | ||
35 | NAME_REF@[33; 38) | ||
36 | IDENT@[33; 38) "field" | ||
37 | COLON@[38; 39) | ||
38 | WHITESPACE@[39; 40) | ||
39 | LITERAL@[40; 41) | ||
40 | INT_NUMBER@[40; 41) "1" | ||
41 | WHITESPACE@[41; 42) | ||
42 | R_CURLY@[42; 43) | ||
43 | WHITESPACE@[43; 44) | ||
44 | R_CURLY@[44; 45) | ||
45 | WHITESPACE@[45; 46) | ||