mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-16 10:25:02 +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,
|
span: next.span,
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
_ => {
|
_ => Err(ParseErr::InvalidTokenPrimary(next)),
|
||||||
println!("{:?}", next);
|
|
||||||
Err(ParseErr::InvalidTokenPrimary(next))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -420,14 +417,6 @@ impl<'code> Parser<'code> {
|
||||||
self.peek().map(|token| &token.kind)
|
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> {
|
fn expect(&mut self, kind: TokenType<'code>) -> ParseResult<'code, Token> {
|
||||||
if let Some(token) = self.next() {
|
if let Some(token) = self.next() {
|
||||||
if token.kind == kind {
|
if token.kind == kind {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue