From f0e5a314b029216c4f9446aa6ba34c4b842db23e Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Thu, 24 Jan 2019 21:31:43 +0000 Subject: Dedupe PATH_FIRST in ATOM_EXPR_FIRST --- crates/ra_syntax/src/grammar/expressions/atom.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/grammar/expressions/atom.rs b/crates/ra_syntax/src/grammar/expressions/atom.rs index 5feca090c..5072d2c49 100644 --- a/crates/ra_syntax/src/grammar/expressions/atom.rs +++ b/crates/ra_syntax/src/grammar/expressions/atom.rs @@ -1,4 +1,5 @@ use super::*; +use crate::grammar::paths::PATH_FIRST; // test expr_literals // fn foo() { @@ -36,11 +37,10 @@ pub(crate) fn literal(p: &mut Parser) -> Option { } // E.g. for after the break in `if break {}`, this should not match -pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![ +pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(PATH_FIRST).union(token_set![ L_PAREN, L_CURLY, L_BRACK, - L_ANGLE, // Universal function call syntax PIPE, MOVE_KW, IF_KW, @@ -48,11 +48,6 @@ pub(super) const ATOM_EXPR_FIRST: TokenSet = LITERAL_FIRST.union(token_set![ MATCH_KW, UNSAFE_KW, RETURN_KW, - IDENT, - SELF_KW, - SUPER_KW, - CRATE_KW, - COLONCOLON, BREAK_KW, CONTINUE_KW, LIFETIME, -- cgit v1.2.3