Removed unused consume overload
This commit is contained in:
parent
f43e0464b6
commit
86a9241632
11
Parser.cs
11
Parser.cs
@ -73,16 +73,7 @@ class Parser
|
|||||||
|
|
||||||
private Token consume(TokenType type, string message)
|
private Token consume(TokenType type, string message)
|
||||||
{
|
{
|
||||||
return consume(new TokenType[] { type }, message);
|
if (check(type)) return advance();
|
||||||
}
|
|
||||||
|
|
||||||
private Token consume(TokenType[] types, string message)
|
|
||||||
{
|
|
||||||
foreach (var type in types)
|
|
||||||
{
|
|
||||||
if (check(type)) return advance();
|
|
||||||
}
|
|
||||||
|
|
||||||
throw error(peek(), message);
|
throw error(peek(), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user