From a3b842fb8b7b5503b1c4fc49355edd4f2fe0d28d Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Wed, 19 Dec 2018 21:19:32 +0000 Subject: Add tests and only traverse in the crates directory --- crates/ra_syntax/src/grammar/expressions.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax/src/grammar/expressions.rs') diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index 5f5a3077d..4f8c46ab3 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs @@ -73,6 +73,10 @@ pub(crate) fn block(p: &mut Parser) { // for _ in () {} // {} // {} + // macro_rules! test { + // () => {} + // } + // test!{} // } if is_blocklike { p.eat(SEMI); @@ -168,13 +172,13 @@ fn current_op(p: &Parser) -> (u8, Op) { // Parses expression with binding power of at least bp. fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { let mut lhs = match lhs(p, r) { - Some((lhs, macro_blocklike)) => { + Some((lhs, blocklike)) => { // test stmt_bin_expr_ambiguity // fn foo() { // let _ = {1} & 2; // {1} &2; // } - if r.prefer_stmt && macro_blocklike.is_block() { + if r.prefer_stmt && blocklike.is_block() { return BlockLike::Block; } lhs -- cgit v1.2.3