mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
cleanup
This commit is contained in:
parent
5f8be98da7
commit
8593ddf18d
1 changed files with 1 additions and 12 deletions
|
|
@ -328,10 +328,7 @@ impl<'code> Parser<'code> {
|
|||
span: next.span,
|
||||
}))
|
||||
}
|
||||
_ => {
|
||||
println!("{:?}", next);
|
||||
Err(ParseErr::InvalidTokenPrimary(next))
|
||||
}
|
||||
_ => Err(ParseErr::InvalidTokenPrimary(next)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -420,14 +417,6 @@ impl<'code> Parser<'code> {
|
|||
self.peek().map(|token| &token.kind)
|
||||
}
|
||||
|
||||
fn maybe_consume(&mut self, kind: TokenType<'code>) -> Option<Token> {
|
||||
if self.peek_kind() == Some(&kind) {
|
||||
self.next()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn expect(&mut self, kind: TokenType<'code>) -> ParseResult<'code, Token> {
|
||||
if let Some(token) = self.next() {
|
||||
if token.kind == kind {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue