diff options
Diffstat (limited to 'src/parser/event_parser/grammar/mod.rs')
-rw-r--r-- | src/parser/event_parser/grammar/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser/event_parser/grammar/mod.rs b/src/parser/event_parser/grammar/mod.rs index d3b63c4c1..32e4db698 100644 --- a/src/parser/event_parser/grammar/mod.rs +++ b/src/parser/event_parser/grammar/mod.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use super::parser::Parser; | 1 | use super::parser::{Parser, TokenSet}; |
2 | use {SyntaxKind}; | 2 | use {SyntaxKind}; |
3 | use tree::EOF; | 3 | use tree::EOF; |
4 | use syntax_kinds::*; | 4 | use syntax_kinds::*; |
@@ -80,8 +80,8 @@ fn comma_list<F: Fn(&mut Parser) -> bool>(p: &mut Parser, end: SyntaxKind, f: F) | |||
80 | 80 | ||
81 | 81 | ||
82 | impl<'p> Parser<'p> { | 82 | impl<'p> Parser<'p> { |
83 | fn at(&self, kind: SyntaxKind) -> bool { | 83 | fn at<L: Lookahead>(&self, l: L) -> bool { |
84 | self.current() == kind | 84 | l.is_ahead(self) |
85 | } | 85 | } |
86 | 86 | ||
87 | pub(crate) fn expect(&mut self, kind: SyntaxKind) -> bool { | 87 | pub(crate) fn expect(&mut self, kind: SyntaxKind) -> bool { |