From 91fb7e208863eb712654367c0793f010e118a918 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 15 Jan 2018 21:44:30 +0300 Subject: Rename `many` -> `repeat` --- src/parser/event_parser/grammar/attributes.rs | 4 ++-- src/parser/event_parser/grammar/items.rs | 2 +- src/parser/event_parser/grammar/mod.rs | 4 ++-- src/parser/event_parser/grammar/paths.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/parser/event_parser/grammar/attributes.rs b/src/parser/event_parser/grammar/attributes.rs index d774f8827..a896b4901 100644 --- a/src/parser/event_parser/grammar/attributes.rs +++ b/src/parser/event_parser/grammar/attributes.rs @@ -5,11 +5,11 @@ enum AttrKind { } pub(super) fn inner_attributes(p: &mut Parser) { - many(p, |p| attribute(p, AttrKind::Inner)) + repeat(p, |p| attribute(p, AttrKind::Inner)) } pub(super) fn outer_attributes(p: &mut Parser) { - many(p, |p| attribute(p, AttrKind::Outer)) + repeat(p, |p| attribute(p, AttrKind::Outer)) } diff --git a/src/parser/event_parser/grammar/items.rs b/src/parser/event_parser/grammar/items.rs index a14f6de77..d2bfeac97 100644 --- a/src/parser/event_parser/grammar/items.rs +++ b/src/parser/event_parser/grammar/items.rs @@ -2,7 +2,7 @@ use super::*; pub(super) fn mod_contents(p: &mut Parser) { attributes::inner_attributes(p); - many(p, |p| { + repeat(p, |p| { skip_to_first( p, item_first, mod_contents_item, "expected item", diff --git a/src/parser/event_parser/grammar/mod.rs b/src/parser/event_parser/grammar/mod.rs index 881bb3ef3..1097344c0 100644 --- a/src/parser/event_parser/grammar/mod.rs +++ b/src/parser/event_parser/grammar/mod.rs @@ -59,7 +59,7 @@ fn node(p: &mut Parser, node_kind: SyntaxKind, rest: F) p.finish(); } -fn many bool>(p: &mut Parser, mut f: F) { +fn repeat bool>(p: &mut Parser, mut f: F) { loop { let pos = p.pos(); if !f(p) { @@ -72,7 +72,7 @@ fn many bool>(p: &mut Parser, mut f: F) { } fn comma_list bool>(p: &mut Parser, end: SyntaxKind, f: F) { - many(p, |p| { + repeat(p, |p| { if p.current() == end { return false } diff --git a/src/parser/event_parser/grammar/paths.rs b/src/parser/event_parser/grammar/paths.rs index 62d1a3bb2..45f3cb779 100644 --- a/src/parser/event_parser/grammar/paths.rs +++ b/src/parser/event_parser/grammar/paths.rs @@ -12,7 +12,7 @@ pub(crate) fn use_path(p: &mut Parser) { node(p, PATH, |p| { path_segment(p, true); }); - many(p, |p| { + repeat(p, |p| { let curr = p.mark(); if p.current() == COLONCOLON && !items::is_use_tree_start(p.raw_lookahead(1)) { node(p, PATH, |p| { -- cgit v1.2.3