From e2b378ef7e0ed82b0f0c874f98032a368fd5f30f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 10 Sep 2019 00:59:29 +0300 Subject: rename bump -> bump_any --- crates/ra_parser/src/grammar/expressions/atom.rs | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'crates/ra_parser/src/grammar/expressions') diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index ec7f2441d..cea79cf6f 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs @@ -31,7 +31,7 @@ pub(crate) fn literal(p: &mut Parser) -> Option { return None; } let m = p.start(); - p.bump(); + p.bump_any(); Some(m.complete(p, LITERAL)) } @@ -100,14 +100,14 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar } T![async] if la == T!['{'] || (la == T![move] && p.nth(2) == T!['{']) => { let m = p.start(); - p.bump(); + p.bump_any(); p.eat(T![move]); block_expr(p, Some(m)) } T![match] => match_expr(p), T![unsafe] if la == T!['{'] => { let m = p.start(); - p.bump(); + p.bump_any(); block_expr(p, Some(m)) } T!['{'] => { @@ -179,7 +179,7 @@ fn tuple_expr(p: &mut Parser) -> CompletedMarker { fn array_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T!['['])); let m = p.start(); - p.bump(); + p.bump_any(); if p.eat(T![']']) { return m.complete(p, ARRAY_EXPR); } @@ -261,11 +261,11 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker { fn if_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T![if])); let m = p.start(); - p.bump(); + p.bump_any(); cond(p); block(p); if p.at(T![else]) { - p.bump(); + p.bump_any(); if p.at(T![if]) { if_expr(p); } else { @@ -284,8 +284,8 @@ fn if_expr(p: &mut Parser) -> CompletedMarker { fn label(p: &mut Parser) { assert!(p.at(LIFETIME) && p.nth(1) == T![:]); let m = p.start(); - p.bump(); - p.bump(); + p.bump_any(); + p.bump_any(); m.complete(p, LABEL); } @@ -296,7 +296,7 @@ fn label(p: &mut Parser) { fn loop_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![loop])); let m = m.unwrap_or_else(|| p.start()); - p.bump(); + p.bump_any(); block(p); m.complete(p, LOOP_EXPR) } @@ -309,7 +309,7 @@ fn loop_expr(p: &mut Parser, m: Option) -> CompletedMarker { fn while_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![while])); let m = m.unwrap_or_else(|| p.start()); - p.bump(); + p.bump_any(); cond(p); block(p); m.complete(p, WHILE_EXPR) @@ -322,7 +322,7 @@ fn while_expr(p: &mut Parser, m: Option) -> CompletedMarker { fn for_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![for])); let m = m.unwrap_or_else(|| p.start()); - p.bump(); + p.bump_any(); patterns::pattern(p); p.expect(T![in]); expr_no_struct(p); @@ -356,7 +356,7 @@ fn cond(p: &mut Parser) { fn match_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T![match])); let m = p.start(); - p.bump(); + p.bump_any(); expr_no_struct(p); if p.at(T!['{']) { match_arm_list(p); @@ -452,7 +452,7 @@ fn match_arm(p: &mut Parser) -> BlockLike { fn match_guard(p: &mut Parser) -> CompletedMarker { assert!(p.at(T![if])); let m = p.start(); - p.bump(); + p.bump_any(); expr(p); m.complete(p, MATCH_GUARD) } @@ -478,7 +478,7 @@ pub(super) fn block_expr(p: &mut Parser, m: Option) -> CompletedMarker { fn return_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T![return])); let m = p.start(); - p.bump(); + p.bump_any(); if p.at_ts(EXPR_FIRST) { expr(p); } @@ -495,7 +495,7 @@ fn return_expr(p: &mut Parser) -> CompletedMarker { fn continue_expr(p: &mut Parser) -> CompletedMarker { assert!(p.at(T![continue])); let m = p.start(); - p.bump(); + p.bump_any(); p.eat(LIFETIME); m.complete(p, CONTINUE_EXPR) } @@ -512,7 +512,7 @@ fn continue_expr(p: &mut Parser) -> CompletedMarker { fn break_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker { assert!(p.at(T![break])); let m = p.start(); - p.bump(); + p.bump_any(); p.eat(LIFETIME); // test break_ambiguity // fn foo(){ @@ -534,7 +534,7 @@ fn break_expr(p: &mut Parser, r: Restrictions) -> CompletedMarker { fn try_block_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![try])); let m = m.unwrap_or_else(|| p.start()); - p.bump(); + p.bump_any(); block(p); m.complete(p, TRY_EXPR) } @@ -548,7 +548,7 @@ fn try_block_expr(p: &mut Parser, m: Option) -> CompletedMarker { fn box_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![box])); let m = m.unwrap_or_else(|| p.start()); - p.bump(); + p.bump_any(); if p.at_ts(EXPR_FIRST) { expr(p); } -- cgit v1.2.3