diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index 4711f64..8af5e81 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -21,7 +21,7 @@ namespace Parser { void filter_comma_list(vector& tokens) { if (tokens.size() >= 2 && tokens[1].toktype != tok::RPAR) { - for (auto iterator = tokens.begin(); iterator < tokens.end() - 1; ++iterator) { + for (auto iterator = tokens.begin(); iterator->toktype != tok::COMMA && iterator < tokens.end() - 1; ++iterator) { const auto nextIterator = iterator + 1; if (nextIterator->toktype == tok::COMMA) { tokens.erase(nextIterator);