aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/parser_api.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src/parser_api.rs')
-rw-r--r--crates/libsyntax2/src/parser_api.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/parser_api.rs b/crates/libsyntax2/src/parser_api.rs
index 70af474ae..9bc58e7f7 100644
--- a/crates/libsyntax2/src/parser_api.rs
+++ b/crates/libsyntax2/src/parser_api.rs
@@ -12,7 +12,7 @@ fn mask(kind: SyntaxKind) -> u128 {
12} 12}
13 13
14impl TokenSet { 14impl TokenSet {
15 const EMPTY: TokenSet = TokenSet(0); 15 pub const EMPTY: TokenSet = TokenSet(0);
16 16
17 pub fn contains(&self, kind: SyntaxKind) -> bool { 17 pub fn contains(&self, kind: SyntaxKind) -> bool {
18 self.0 & mask(kind) != 0 18 self.0 & mask(kind) != 0
@@ -145,10 +145,10 @@ impl<'t> Parser<'t> {
145 } 145 }
146 146
147 /// Create an error node and consume the next token. 147 /// Create an error node and consume the next token.
148 pub(crate) fn err_recover(&mut self, message: &str, recovery_set: TokenSet) { 148 pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) {
149 if self.at(SyntaxKind::L_CURLY) 149 if self.at(SyntaxKind::L_CURLY)
150 || self.at(SyntaxKind::R_CURLY) 150 || self.at(SyntaxKind::R_CURLY)
151 || recovery_set.contains(self.current()) { 151 || recovery.contains(self.current()) {
152 self.error(message); 152 self.error(message);
153 } else { 153 } else {
154 let m = self.start(); 154 let m = self.start();