From 8fc7f438c4347e027deda5cda4bcd5e560610bb7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Aug 2018 13:35:48 +0300 Subject: start item recovery --- crates/libsyntax2/src/parser_api.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/libsyntax2/src/parser_api.rs') 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 { } impl TokenSet { - const EMPTY: TokenSet = TokenSet(0); + pub const EMPTY: TokenSet = TokenSet(0); pub fn contains(&self, kind: SyntaxKind) -> bool { self.0 & mask(kind) != 0 @@ -145,10 +145,10 @@ impl<'t> Parser<'t> { } /// Create an error node and consume the next token. - pub(crate) fn err_recover(&mut self, message: &str, recovery_set: TokenSet) { + pub(crate) fn err_recover(&mut self, message: &str, recovery: TokenSet) { if self.at(SyntaxKind::L_CURLY) || self.at(SyntaxKind::R_CURLY) - || recovery_set.contains(self.current()) { + || recovery.contains(self.current()) { self.error(message); } else { let m = self.start(); -- cgit v1.2.3