diff options
author | Aleksey Kladov <[email protected]> | 2018-09-08 08:38:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-08 08:38:53 +0100 |
commit | 749907d330e5487eb7997479e2aba4ac2c2e3494 (patch) | |
tree | 0668eeb5ba9cbc8e1eb1b6e6ae3de70cf6aaa2a9 /crates/libsyntax2/src/parser_api.rs | |
parent | febbc9acdd0166530499b9b129ee703fcbfbe978 (diff) |
simplify
Diffstat (limited to 'crates/libsyntax2/src/parser_api.rs')
-rw-r--r-- | crates/libsyntax2/src/parser_api.rs | 5 |
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 | } |