diff options
Diffstat (limited to 'tests/data/parser/ok')
-rw-r--r-- | tests/data/parser/ok/0002_struct_item_field.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/ok/0016_struct_flavors.rs | 10 | ||||
-rw-r--r-- | tests/data/parser/ok/0016_struct_flavors.txt | 66 |
3 files changed, 77 insertions, 1 deletions
diff --git a/tests/data/parser/ok/0002_struct_item_field.txt b/tests/data/parser/ok/0002_struct_item_field.txt index 87ab3f7a9..58042f6a7 100644 --- a/tests/data/parser/ok/0002_struct_item_field.txt +++ b/tests/data/parser/ok/0002_struct_item_field.txt | |||
@@ -5,7 +5,7 @@ FILE@[0; 25) | |||
5 | IDENT@[7; 8) | 5 | IDENT@[7; 8) |
6 | WHITESPACE@[8; 9) | 6 | WHITESPACE@[8; 9) |
7 | L_CURLY@[9; 10) | 7 | L_CURLY@[9; 10) |
8 | STRUCT_FIELD@[10; 24) | 8 | NAMED_FIELD@[10; 24) |
9 | WHITESPACE@[10; 15) | 9 | WHITESPACE@[10; 15) |
10 | IDENT@[15; 18) | 10 | IDENT@[15; 18) |
11 | COLON@[18; 19) | 11 | COLON@[18; 19) |
diff --git a/tests/data/parser/ok/0016_struct_flavors.rs b/tests/data/parser/ok/0016_struct_flavors.rs new file mode 100644 index 000000000..69638350c --- /dev/null +++ b/tests/data/parser/ok/0016_struct_flavors.rs | |||
@@ -0,0 +1,10 @@ | |||
1 | struct A; | ||
2 | struct B {} | ||
3 | struct C(); | ||
4 | |||
5 | struct D { | ||
6 | a: u32, | ||
7 | pub b: u32 | ||
8 | } | ||
9 | |||
10 | struct E(pub x, y,); | ||
diff --git a/tests/data/parser/ok/0016_struct_flavors.txt b/tests/data/parser/ok/0016_struct_flavors.txt new file mode 100644 index 000000000..93b16e1b9 --- /dev/null +++ b/tests/data/parser/ok/0016_struct_flavors.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | FILE@[0; 97) | ||
2 | STRUCT_ITEM@[0; 10) | ||
3 | STRUCT_KW@[0; 6) | ||
4 | WHITESPACE@[6; 7) | ||
5 | IDENT@[7; 8) | ||
6 | SEMI@[8; 9) | ||
7 | WHITESPACE@[9; 10) | ||
8 | STRUCT_ITEM@[10; 22) | ||
9 | STRUCT_KW@[10; 16) | ||
10 | WHITESPACE@[16; 17) | ||
11 | IDENT@[17; 18) | ||
12 | WHITESPACE@[18; 19) | ||
13 | L_CURLY@[19; 20) | ||
14 | R_CURLY@[20; 21) | ||
15 | WHITESPACE@[21; 22) | ||
16 | STRUCT_ITEM@[22; 35) | ||
17 | STRUCT_KW@[22; 28) | ||
18 | WHITESPACE@[28; 29) | ||
19 | IDENT@[29; 30) | ||
20 | L_PAREN@[30; 31) | ||
21 | R_PAREN@[31; 32) | ||
22 | SEMI@[32; 33) | ||
23 | WHITESPACE@[33; 35) | ||
24 | STRUCT_ITEM@[35; 76) | ||
25 | STRUCT_KW@[35; 41) | ||
26 | WHITESPACE@[41; 42) | ||
27 | IDENT@[42; 43) | ||
28 | WHITESPACE@[43; 44) | ||
29 | L_CURLY@[44; 45) | ||
30 | NAMED_FIELD@[45; 56) | ||
31 | WHITESPACE@[45; 50) | ||
32 | IDENT@[50; 51) | ||
33 | COLON@[51; 52) | ||
34 | WHITESPACE@[52; 53) | ||
35 | IDENT@[53; 56) | ||
36 | COMMA@[56; 57) | ||
37 | NAMED_FIELD@[57; 73) | ||
38 | VISIBILITY@[57; 66) | ||
39 | WHITESPACE@[57; 62) | ||
40 | PUB_KW@[62; 65) | ||
41 | WHITESPACE@[65; 66) | ||
42 | IDENT@[66; 67) | ||
43 | COLON@[67; 68) | ||
44 | WHITESPACE@[68; 69) | ||
45 | IDENT@[69; 72) | ||
46 | WHITESPACE@[72; 73) | ||
47 | R_CURLY@[73; 74) | ||
48 | WHITESPACE@[74; 76) | ||
49 | STRUCT_ITEM@[76; 97) | ||
50 | STRUCT_KW@[76; 82) | ||
51 | WHITESPACE@[82; 83) | ||
52 | IDENT@[83; 84) | ||
53 | L_PAREN@[84; 85) | ||
54 | POS_FIELD@[85; 90) | ||
55 | VISIBILITY@[85; 89) | ||
56 | PUB_KW@[85; 88) | ||
57 | WHITESPACE@[88; 89) | ||
58 | IDENT@[89; 90) | ||
59 | COMMA@[90; 91) | ||
60 | POS_FIELD@[91; 93) | ||
61 | WHITESPACE@[91; 92) | ||
62 | IDENT@[92; 93) | ||
63 | COMMA@[93; 94) | ||
64 | R_PAREN@[94; 95) | ||
65 | SEMI@[95; 96) | ||
66 | WHITESPACE@[96; 97) | ||