aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-13 17:28:23 +0100
committerAleksey Kladov <[email protected]>2020-08-13 17:50:21 +0100
commitef462ed6af7ae8e0d30894baefe6ba1ff49aab8f (patch)
tree1ee2aaf3f2b3ae4901ddd03985b5d217d1521612 /crates/parser/src
parent0e1cda3079eb9936dcf8acec3e47bad48c5ccc58 (diff)
Better recovery in `use foo::;`
Diffstat (limited to 'crates/parser/src')
-rw-r--r--crates/parser/src/grammar/items.rs16
1 files changed, 14 insertions, 2 deletions
diff --git a/crates/parser/src/grammar/items.rs b/crates/parser/src/grammar/items.rs
index b2f7cc21f..8fd8f3b80 100644
--- a/crates/parser/src/grammar/items.rs
+++ b/crates/parser/src/grammar/items.rs
@@ -27,8 +27,20 @@ pub(super) fn mod_contents(p: &mut Parser, stop_on_r_curly: bool) {
27} 27}
28 28
29pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![ 29pub(super) const ITEM_RECOVERY_SET: TokenSet = token_set![
30 FN_KW, STRUCT_KW, ENUM_KW, IMPL_KW, TRAIT_KW, CONST_KW, STATIC_KW, LET_KW, MOD_KW, PUB_KW, 30 FN_KW,
31 CRATE_KW, USE_KW, MACRO_KW 31 STRUCT_KW,
32 ENUM_KW,
33 IMPL_KW,
34 TRAIT_KW,
35 CONST_KW,
36 STATIC_KW,
37 LET_KW,
38 MOD_KW,
39 PUB_KW,
40 CRATE_KW,
41 USE_KW,
42 MACRO_KW,
43 T![;],
32]; 44];
33 45
34pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool) { 46pub(super) fn item_or_macro(p: &mut Parser, stop_on_r_curly: bool) {