diff options
author | Aleksey Kladov <[email protected]> | 2018-01-13 08:55:03 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-01-13 08:55:03 +0000 |
commit | 29b2e0adcc35834dda2884222624bfcc268a3eff (patch) | |
tree | 0838a22c27bba0361dcde3660075175f243a4d7a /tests/data/parser/ok | |
parent | f31d85860771b0c4c8d232d79e4a3489a051ba9d (diff) |
G: allow self & super in paths
Diffstat (limited to 'tests/data/parser/ok')
-rw-r--r-- | tests/data/parser/ok/0012_visibility.txt | 2 | ||||
-rw-r--r-- | tests/data/parser/ok/0013_use_path_self_super.rs | 3 | ||||
-rw-r--r-- | tests/data/parser/ok/0013_use_path_self_super.txt | 50 |
3 files changed, 54 insertions, 1 deletions
diff --git a/tests/data/parser/ok/0012_visibility.txt b/tests/data/parser/ok/0012_visibility.txt index 8324c48d5..0e091724d 100644 --- a/tests/data/parser/ok/0012_visibility.txt +++ b/tests/data/parser/ok/0012_visibility.txt | |||
@@ -58,7 +58,7 @@ FILE@[0; 98) | |||
58 | VISIBILITY@[66; 88) | 58 | VISIBILITY@[66; 88) |
59 | PUB_KW@[66; 69) | 59 | PUB_KW@[66; 69) |
60 | L_PAREN@[69; 70) | 60 | L_PAREN@[69; 70) |
61 | IDENT@[70; 72) | 61 | IN_KW@[70; 72) |
62 | PATH@[72; 86) | 62 | PATH@[72; 86) |
63 | PATH@[72; 81) | 63 | PATH@[72; 81) |
64 | PATH@[72; 76) | 64 | PATH@[72; 76) |
diff --git a/tests/data/parser/ok/0013_use_path_self_super.rs b/tests/data/parser/ok/0013_use_path_self_super.rs new file mode 100644 index 000000000..faf6a42c7 --- /dev/null +++ b/tests/data/parser/ok/0013_use_path_self_super.rs | |||
@@ -0,0 +1,3 @@ | |||
1 | use self::foo; | ||
2 | use super::super::bar; | ||
3 | use ::self::a::super::bar; | ||
diff --git a/tests/data/parser/ok/0013_use_path_self_super.txt b/tests/data/parser/ok/0013_use_path_self_super.txt new file mode 100644 index 000000000..90bbb9b2d --- /dev/null +++ b/tests/data/parser/ok/0013_use_path_self_super.txt | |||
@@ -0,0 +1,50 @@ | |||
1 | FILE@[0; 65) | ||
2 | USE_ITEM@[0; 15) | ||
3 | USE_KW@[0; 3) | ||
4 | PATH@[3; 13) | ||
5 | PATH@[3; 8) | ||
6 | PATH_SEGMENT@[3; 8) | ||
7 | WHITESPACE@[3; 4) | ||
8 | SELF_KW@[4; 8) | ||
9 | COLONCOLON@[8; 10) | ||
10 | PATH_SEGMENT@[10; 13) | ||
11 | IDENT@[10; 13) | ||
12 | SEMI@[13; 14) | ||
13 | WHITESPACE@[14; 15) | ||
14 | USE_ITEM@[15; 38) | ||
15 | USE_KW@[15; 18) | ||
16 | PATH@[18; 36) | ||
17 | PATH@[18; 31) | ||
18 | PATH@[18; 24) | ||
19 | PATH_SEGMENT@[18; 24) | ||
20 | WHITESPACE@[18; 19) | ||
21 | SUPER_KW@[19; 24) | ||
22 | COLONCOLON@[24; 26) | ||
23 | PATH_SEGMENT@[26; 31) | ||
24 | SUPER_KW@[26; 31) | ||
25 | COLONCOLON@[31; 33) | ||
26 | PATH_SEGMENT@[33; 36) | ||
27 | IDENT@[33; 36) | ||
28 | SEMI@[36; 37) | ||
29 | WHITESPACE@[37; 38) | ||
30 | USE_ITEM@[38; 65) | ||
31 | USE_KW@[38; 41) | ||
32 | PATH@[41; 63) | ||
33 | PATH@[41; 58) | ||
34 | PATH@[41; 51) | ||
35 | PATH@[41; 48) | ||
36 | PATH_SEGMENT@[41; 48) | ||
37 | WHITESPACE@[41; 42) | ||
38 | COLONCOLON@[42; 44) | ||
39 | SELF_KW@[44; 48) | ||
40 | COLONCOLON@[48; 50) | ||
41 | PATH_SEGMENT@[50; 51) | ||
42 | IDENT@[50; 51) | ||
43 | COLONCOLON@[51; 53) | ||
44 | PATH_SEGMENT@[53; 58) | ||
45 | SUPER_KW@[53; 58) | ||
46 | COLONCOLON@[58; 60) | ||
47 | PATH_SEGMENT@[60; 63) | ||
48 | IDENT@[60; 63) | ||
49 | SEMI@[63; 64) | ||
50 | WHITESPACE@[64; 65) | ||