aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/grammar/paths.rs
blob: 96966b380b3fff3bab8d800c72fb12c4acc2ef7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::*;

pub(crate) fn use_path(p: &mut Parser) {
    if !AnyOf(&[IDENT, COLONCOLON]).is_ahead(p) {
        return;
    }
    node(p, PATH, |p| {
        p.eat(COLONCOLON);
        path_segment(p);
    })
}

fn path_segment(p: &mut Parser) -> bool {
    node_if(p, IDENT, PATH_SEGMENT, |p| ())
}