From 4f31fed362e1bb08f748b188eedc0bdc5a070bee Mon Sep 17 00:00:00 2001 From: bravomikekilo Date: Wed, 14 Aug 2019 21:20:04 +0800 Subject: fix test position --- crates/ra_parser/src/grammar/expressions/atom.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'crates/ra_parser/src') diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 6e25e3cb4..50c70b3b3 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs @@ -111,6 +111,12 @@ pub(super) fn atom_expr(p: &mut Parser, r: Restrictions) -> Option<(CompletedMar block_expr(p, Some(m)) } T!['{'] => { + // test for_range_from + // fn foo() { + // for x in 0 .. { + // break; + // } + // } if r.forbid_structs { return None; } else { @@ -313,16 +319,6 @@ fn while_expr(p: &mut Parser, m: Option) -> CompletedMarker { // fn foo() { // for x in [] {}; // } - -// test for_range_block -// fn foo() { -// for x in 0 .. { -// break; -// } -// for _x in 0 .. (0 .. {1 + 2}).sum::() { -// break; -// } -// } fn for_expr(p: &mut Parser, m: Option) -> CompletedMarker { assert!(p.at(T![for])); let m = m.unwrap_or_else(|| p.start()); -- cgit v1.2.3