From 20eda09712f0c4cd701575d125122472252820db Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 6 Mar 2021 04:57:34 +0800 Subject: Fix fail to parse :: for meta in mbe --- crates/parser/src/grammar.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/parser/src') diff --git a/crates/parser/src/grammar.rs b/crates/parser/src/grammar.rs index 6913e9ec2..6159d064c 100644 --- a/crates/parser/src/grammar.rs +++ b/crates/parser/src/grammar.rs @@ -95,7 +95,7 @@ pub(crate) mod fragments { // https://doc.rust-lang.org/reference/paths.html#simple-paths // The start of an meta must be a simple path match p.current() { - IDENT | T![::] | T![super] | T![self] | T![crate] => p.bump_any(), + IDENT | T![super] | T![self] | T![crate] => p.bump_any(), T![=] => { p.bump_any(); match p.current() { @@ -105,6 +105,7 @@ pub(crate) mod fragments { } break; } + _ if p.at(T![::]) => p.bump(T![::]), _ => break, } } -- cgit v1.2.3