diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index a002912..4ce100b 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -67,8 +67,8 @@ namespace Parser { } else { unsigned int parametersDistance = 0; if (next.toktype == LPAR) { - const auto it = find_if(lexed.begin() + i, lexed.end(), [](const tok& token){ return token.toktype == RPAR; }); - parametersDistance = distance(lexed.begin() + i, it); + const auto closing = find_if(lexed.begin() + i, lexed.end(), [](const tok& token){ return token.toktype == RPAR; }); + parametersDistance = distance(lexed.begin() + i, closing); i += parametersDistance; } if (nextAre({LCOMP, LCOMP, LBRACE})) {