From 18b667cfcb31b2c5e421d12a34b34e83165603f4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 25 Aug 2020 17:20:29 +0200 Subject: Complete `pub` in fields --- crates/parser/src/grammar/types.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'crates/parser/src/grammar') diff --git a/crates/parser/src/grammar/types.rs b/crates/parser/src/grammar/types.rs index c876545f4..9d00eb9b9 100644 --- a/crates/parser/src/grammar/types.rs +++ b/crates/parser/src/grammar/types.rs @@ -18,7 +18,14 @@ pub(super) const TYPE_FIRST: TokenSet = paths::PATH_FIRST.union(token_set![ T![dyn], ]); -const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; +const TYPE_RECOVERY_SET: TokenSet = token_set![ + T![')'], + T![,], + L_DOLLAR, + // test_err struct_field_recover + // struct S { f pub g: () } + T![pub], +]; pub(crate) fn type_(p: &mut Parser) { type_with_bounds_cond(p, true); -- cgit v1.2.3