diff --git a/Parser.cs b/Parser.cs index f2057d3..5762602 100644 --- a/Parser.cs +++ b/Parser.cs @@ -73,16 +73,7 @@ class Parser private Token consume(TokenType type, string message) { - return consume(new TokenType[] { type }, message); - } - - private Token consume(TokenType[] types, string message) - { - foreach (var type in types) - { - if (check(type)) return advance(); - } - + if (check(type)) return advance(); throw error(peek(), message); }