diff options
author | Aleksey Kladov <[email protected]> | 2018-01-09 19:35:55 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-09 19:35:55 +0000 |
commit | 1544e89c49c67df00fc72d841f3e39be792cbe2b (patch) | |
tree | 1c8354cd22a77cfc32a2026fa1535cc2986007f8 /tests/data | |
parent | 7f8ca07d864b5ec8e668c48c4c029dd0584eae4a (diff) |
G: mod item
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/lexer/0011_keywords.rs | 2 | ||||
-rw-r--r-- | tests/data/lexer/0011_keywords.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/ok/0008_mod_item.rs | 17 | ||||
-rw-r--r-- | tests/data/parser/ok/0008_mod_item.txt | 75 |
4 files changed, 95 insertions, 1 deletions
diff --git a/tests/data/lexer/0011_keywords.rs b/tests/data/lexer/0011_keywords.rs index 4adb1587e..58568b20d 100644 --- a/tests/data/lexer/0011_keywords.rs +++ b/tests/data/lexer/0011_keywords.rs | |||
@@ -1 +1 @@ | |||
fn use struct trait enum impl true false as extern crate | fn use struct trait enum impl true false as extern crate mod | ||
diff --git a/tests/data/lexer/0011_keywords.txt b/tests/data/lexer/0011_keywords.txt index bf8ceffd4..35d9a3871 100644 --- a/tests/data/lexer/0011_keywords.txt +++ b/tests/data/lexer/0011_keywords.txt | |||
@@ -19,4 +19,6 @@ WHITESPACE 1 " " | |||
19 | EXTERN_KW 6 "extern" | 19 | EXTERN_KW 6 "extern" |
20 | WHITESPACE 1 " " | 20 | WHITESPACE 1 " " |
21 | CRATE_KW 5 "crate" | 21 | CRATE_KW 5 "crate" |
22 | WHITESPACE 1 " " | ||
23 | MOD_KW 3 "mod" | ||
22 | WHITESPACE 1 "\n" | 24 | WHITESPACE 1 "\n" |
diff --git a/tests/data/parser/ok/0008_mod_item.rs b/tests/data/parser/ok/0008_mod_item.rs new file mode 100644 index 000000000..d22993bc1 --- /dev/null +++ b/tests/data/parser/ok/0008_mod_item.rs | |||
@@ -0,0 +1,17 @@ | |||
1 | mod a; | ||
2 | |||
3 | mod b { | ||
4 | } | ||
5 | |||
6 | mod c { | ||
7 | fn foo() { | ||
8 | } | ||
9 | struct S {} | ||
10 | } | ||
11 | |||
12 | mod d { | ||
13 | #![attr] | ||
14 | mod e; | ||
15 | mod f { | ||
16 | } | ||
17 | } \ No newline at end of file | ||
diff --git a/tests/data/parser/ok/0008_mod_item.txt b/tests/data/parser/ok/0008_mod_item.txt new file mode 100644 index 000000000..425e3344c --- /dev/null +++ b/tests/data/parser/ok/0008_mod_item.txt | |||
@@ -0,0 +1,75 @@ | |||
1 | FILE@[0; 118) | ||
2 | MOD_ITEM@[0; 8) | ||
3 | MOD_KW@[0; 3) | ||
4 | WHITESPACE@[3; 4) | ||
5 | IDENT@[4; 5) | ||
6 | SEMI@[5; 6) | ||
7 | WHITESPACE@[6; 8) | ||
8 | MOD_ITEM@[8; 19) | ||
9 | MOD_KW@[8; 11) | ||
10 | WHITESPACE@[11; 12) | ||
11 | IDENT@[12; 13) | ||
12 | WHITESPACE@[13; 14) | ||
13 | L_CURLY@[14; 15) | ||
14 | WHITESPACE@[15; 16) | ||
15 | R_CURLY@[16; 17) | ||
16 | WHITESPACE@[17; 19) | ||
17 | MOD_ITEM@[19; 67) | ||
18 | MOD_KW@[19; 22) | ||
19 | WHITESPACE@[22; 23) | ||
20 | IDENT@[23; 24) | ||
21 | WHITESPACE@[24; 25) | ||
22 | L_CURLY@[25; 26) | ||
23 | FN_ITEM@[26; 52) | ||
24 | WHITESPACE@[26; 31) | ||
25 | FN_KW@[31; 33) | ||
26 | WHITESPACE@[33; 34) | ||
27 | IDENT@[34; 37) | ||
28 | L_PAREN@[37; 38) | ||
29 | R_PAREN@[38; 39) | ||
30 | WHITESPACE@[39; 40) | ||
31 | L_CURLY@[40; 41) | ||
32 | WHITESPACE@[41; 46) | ||
33 | R_CURLY@[46; 47) | ||
34 | WHITESPACE@[47; 52) | ||
35 | STRUCT_ITEM@[52; 64) | ||
36 | STRUCT_KW@[52; 58) | ||
37 | WHITESPACE@[58; 59) | ||
38 | IDENT@[59; 60) | ||
39 | WHITESPACE@[60; 61) | ||
40 | L_CURLY@[61; 62) | ||
41 | R_CURLY@[62; 63) | ||
42 | WHITESPACE@[63; 64) | ||
43 | R_CURLY@[64; 65) | ||
44 | WHITESPACE@[65; 67) | ||
45 | MOD_ITEM@[67; 118) | ||
46 | MOD_KW@[67; 70) | ||
47 | WHITESPACE@[70; 71) | ||
48 | IDENT@[71; 72) | ||
49 | WHITESPACE@[72; 73) | ||
50 | L_CURLY@[73; 74) | ||
51 | ATTR@[74; 92) | ||
52 | WHITESPACE@[74; 79) | ||
53 | POUND@[79; 80) | ||
54 | EXCL@[80; 81) | ||
55 | L_BRACK@[81; 82) | ||
56 | META_ITEM@[82; 86) | ||
57 | IDENT@[82; 86) | ||
58 | R_BRACK@[86; 87) | ||
59 | WHITESPACE@[87; 92) | ||
60 | MOD_ITEM@[92; 103) | ||
61 | MOD_KW@[92; 95) | ||
62 | WHITESPACE@[95; 96) | ||
63 | IDENT@[96; 97) | ||
64 | SEMI@[97; 98) | ||
65 | WHITESPACE@[98; 103) | ||
66 | MOD_ITEM@[103; 117) | ||
67 | MOD_KW@[103; 106) | ||
68 | WHITESPACE@[106; 107) | ||
69 | IDENT@[107; 108) | ||
70 | WHITESPACE@[108; 109) | ||
71 | L_CURLY@[109; 110) | ||
72 | WHITESPACE@[110; 115) | ||
73 | R_CURLY@[115; 116) | ||
74 | WHITESPACE@[116; 117) | ||
75 | R_CURLY@[117; 118) | ||