From 86a9241632a8cc048bfaa784d8e939424dd6fac5 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Sun, 2 Jul 2023 17:09:34 -0600 Subject: [PATCH] Removed unused consume overload --- Parser.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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); }