From 197a2e6fefd45627920cfb9bbca24b446e5a7c89 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 30 Jan 2018 22:53:19 +0300 Subject: G: type_parameter_list --- src/parser/event_parser/grammar/paths.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/parser/event_parser/grammar/paths.rs') diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index a254ab05e..bf3c8aedd 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs @@ -1,10 +1,18 @@ use super::*; -pub(crate) fn is_path_start(p: &Parser) -> bool { +pub(super) fn is_path_start(p: &Parser) -> bool { AnyOf(&[IDENT, SELF_KW, SUPER_KW, COLONCOLON]).is_ahead(p) } -pub(crate) fn use_path(p: &mut Parser) { +pub(super) fn use_path(p: &mut Parser) { + path(p) +} + +pub(super) fn type_path(p: &mut Parser) { + path(p) +} + +fn path(p: &mut Parser) { if !is_path_start(p) { return; } @@ -24,6 +32,7 @@ pub(crate) fn use_path(p: &mut Parser) { } } + fn path_segment(p: &mut Parser, first: bool) { let segment = p.start(); if first { -- cgit v1.2.3 From 7a02097b717c6f7055a92c52dca65c374b06f057 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 30 Jan 2018 22:56:13 +0300 Subject: Formatting --- src/parser/event_parser/grammar/paths.rs | 1 - 1 file changed, 1 deletion(-) (limited to 'src/parser/event_parser/grammar/paths.rs') diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index bf3c8aedd..4c0d2c8b4 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs @@ -32,7 +32,6 @@ fn path(p: &mut Parser) { } } - fn path_segment(p: &mut Parser, first: bool) { let segment = p.start(); if first { -- cgit v1.2.3