aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/paths.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-02-02 19:21:06 +0000
committerAleksey Kladov <[email protected]>2018-02-02 19:21:06 +0000
commit7cdf990c40e932a466e8799ca3fa582467d32c91 (patch)
tree576f37f47b9cde6cc4f9ee0890f59cda58d03a14 /src/parser/event_parser/grammar/paths.rs
parenta1fcead680b0f52036dd48dd1781606e7a7339db (diff)
Move use item parsing to a separate file
Diffstat (limited to 'src/parser/event_parser/grammar/paths.rs')
-rw-r--r--src/parser/event_parser/grammar/paths.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs
index 4c0d2c8b4..6efac2610 100644
--- a/src/parser/event_parser/grammar/paths.rs
+++ b/src/parser/event_parser/grammar/paths.rs
@@ -20,7 +20,11 @@ fn path(p: &mut Parser) {
20 path_segment(p, true); 20 path_segment(p, true);
21 let mut qual = path.complete(p, PATH); 21 let mut qual = path.complete(p, PATH);
22 loop { 22 loop {
23 if p.at(COLONCOLON) && !items::is_use_tree_start(p.nth(1)) { 23 let use_tree = match p.nth(1) {
24 STAR | L_CURLY => true,
25 _ => false,
26 };
27 if p.at(COLONCOLON) && !use_tree {
24 let path = qual.precede(p); 28 let path = qual.precede(p);
25 p.bump(); 29 p.bump();
26 path_segment(p, false); 30 path_segment(p, false);