aboutsummaryrefslogtreecommitdiff
path: root/src/parser/event_parser/parser.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-28 11:33:10 +0000
committerAleksey Kladov <[email protected]>2018-01-28 11:33:10 +0000
commit2141888782a74de4a655fee585c99163a3e75e5c (patch)
tree044832f0c569f54ca92bdf618c6cc4b3b68940e9 /src/parser/event_parser/parser.rs
parent60725def49834bb7dfd46c1a7b84d86f810e1d03 (diff)
Rename raw_lookahead -> nth
Diffstat (limited to 'src/parser/event_parser/parser.rs')
-rw-r--r--src/parser/event_parser/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser/event_parser/parser.rs b/src/parser/event_parser/parser.rs
index 2507af6bf..a15d0b633 100644
--- a/src/parser/event_parser/parser.rs
+++ b/src/parser/event_parser/parser.rs
@@ -164,12 +164,12 @@ impl<'t> Parser<'t> {
164 kind 164 kind
165 } 165 }
166 166
167 pub(crate) fn raw_lookahead(&self, n: usize) -> SyntaxKind { 167 pub(crate) fn nth(&self, n: usize) -> SyntaxKind {
168 self.tokens.get(self.pos + n).map(|t| t.kind).unwrap_or(EOF) 168 self.tokens.get(self.pos + n).map(|t| t.kind).unwrap_or(EOF)
169 } 169 }
170 170
171 pub(crate) fn current(&self) -> SyntaxKind { 171 pub(crate) fn current(&self) -> SyntaxKind {
172 self.raw_lookahead(0) 172 self.nth(0)
173 } 173 }
174 174
175 fn event(&mut self, event: Event) { 175 fn event(&mut self, event: Event) {