diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-02-02 18:32:51 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-02-02 18:32:51 +0000 |
commit | 3c6ccfe6474cf15e7c59c8b6c01d8a1b3604ba02 (patch) | |
tree | 9c0b788009666087bdaa4072f0a466ff7cc93caf /src/parser/event_parser/grammar/paths.rs | |
parent | 94caa9d3a2c645df5c0f2d332bc001831119484d (diff) | |
parent | 7a02097b717c6f7055a92c52dca65c374b06f057 (diff) |
Merge #32
32: G: type_parameter_list r=matklad a=matklad
Diffstat (limited to 'src/parser/event_parser/grammar/paths.rs')
-rw-r--r-- | src/parser/event_parser/grammar/paths.rs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index a254ab05e..4c0d2c8b4 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs | |||
@@ -1,10 +1,18 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(crate) fn is_path_start(p: &Parser) -> bool { | 3 | pub(super) fn is_path_start(p: &Parser) -> bool { |
4 | AnyOf(&[IDENT, SELF_KW, SUPER_KW, COLONCOLON]).is_ahead(p) | 4 | AnyOf(&[IDENT, SELF_KW, SUPER_KW, COLONCOLON]).is_ahead(p) |
5 | } | 5 | } |
6 | 6 | ||
7 | pub(crate) fn use_path(p: &mut Parser) { | 7 | pub(super) fn use_path(p: &mut Parser) { |
8 | path(p) | ||
9 | } | ||
10 | |||
11 | pub(super) fn type_path(p: &mut Parser) { | ||
12 | path(p) | ||
13 | } | ||
14 | |||
15 | fn path(p: &mut Parser) { | ||
8 | if !is_path_start(p) { | 16 | if !is_path_start(p) { |
9 | return; | 17 | return; |
10 | } | 18 | } |