aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/parser_api.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-09-08 08:38:53 +0100
committerAleksey Kladov <[email protected]>2018-09-08 08:38:53 +0100
commit749907d330e5487eb7997479e2aba4ac2c2e3494 (patch)
tree0668eeb5ba9cbc8e1eb1b6e6ae3de70cf6aaa2a9 /crates/libsyntax2/src/parser_api.rs
parentfebbc9acdd0166530499b9b129ee703fcbfbe978 (diff)
simplify
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 }