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.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/libsyntax2/src/parser_api.rs b/crates/libsyntax2/src/parser_api.rs
index c4753140e..7d97159dd 100644
--- a/crates/libsyntax2/src/parser_api.rs
+++ b/crates/libsyntax2/src/parser_api.rs
@@ -35,6 +35,11 @@ impl<'t> Parser<'t> {
35 self.current() == kind 35 self.current() == kind
36 } 36 }
37 37
38 /// Checks if the current token is `kind`.
39 pub(crate) fn at_ts(&self, kinds: TokenSet) -> bool {
40 kinds.contains(self.current())
41 }
42
38 pub(crate) fn next2(&self) -> Option<(SyntaxKind, SyntaxKind)> { 43 pub(crate) fn next2(&self) -> Option<(SyntaxKind, SyntaxKind)> {
39 self.0.next2() 44 self.0.next2()
40 } 45 }