diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index 8af5e81..835187e 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -29,7 +29,11 @@ namespace Parser { } } } - inline vector filter_comma_list(vector&& tokens) { filter_comma_list(tokens); return tokens; } + vector filter_comma_list(input_iterator auto begin, input_iterator auto end) { + vector tokens(begin, end); + filter_comma_list(tokens); + return tokens; + } IS(ParseTree) inline T parse(const input_iterator auto&, const input_iterator auto&); @@ -86,7 +90,7 @@ namespace Parser { if (nextAre({LCOMP, LCOMP, LBRACE})) { Function function(current.toktext); if (parametersDistance > 2) { - function.parameters = parse(filter_comma_list(vector(lexed.begin() + ((i + 2) - parametersDistance), lexed.begin() + i))); + function.parameters = parse(filter_comma_list(lexed.begin() + ((i + 2) - parametersDistance), lexed.begin() + i)); } parseTree << function; i += 2;