aboutsummaryrefslogtreecommitdiff
path: root/crates/parser
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-25 16:20:29 +0100
committerAleksey Kladov <[email protected]>2020-08-25 16:22:23 +0100
commit18b667cfcb31b2c5e421d12a34b34e83165603f4 (patch)
treec9a8da95da29f52b35e7f06171a34ecaeb9b8cfa /crates/parser
parent6b8bc132dc6dee538964fffa0720480beb5b25dd (diff)
Complete `pub` in fields
Diffstat (limited to 'crates/parser')
-rw-r--r--crates/parser/src/grammar/types.rs9
1 files changed, 8 insertions, 1 deletions
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![
18 T![dyn], 18 T![dyn],
19]); 19]);
20 20
21const TYPE_RECOVERY_SET: TokenSet = token_set![R_PAREN, COMMA, L_DOLLAR]; 21const TYPE_RECOVERY_SET: TokenSet = token_set![
22 T![')'],
23 T![,],
24 L_DOLLAR,
25 // test_err struct_field_recover
26 // struct S { f pub g: () }
27 T![pub],
28];
22 29
23pub(crate) fn type_(p: &mut Parser) { 30pub(crate) fn type_(p: &mut Parser) {
24 type_with_bounds_cond(p, true); 31 type_with_bounds_cond(p, true);