Complete pub in fields

This commit is contained in:
Aleksey Kladov 2020-08-25 17:20:29 +02:00
parent 6b8bc132dc
commit 18b667cfcb
7 changed files with 76 additions and 8 deletions

View file

@ -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);