aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 17:50:50 +0100
committerGitHub <[email protected]>2020-08-13 17:50:50 +0100
commit3d6fd620e80050d68e6da55aabad2ca780ba2323 (patch)
tree1ee2aaf3f2b3ae4901ddd03985b5d217d1521612 /crates/parser/src
parent018a6cac072767dfd630c22e6d9ce134b7bb09af (diff)
parentef462ed6af7ae8e0d30894baefe6ba1ff49aab8f (diff)
Merge #5751
5751: Better recovery in `use foo::;` r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
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) {