diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index ccb2c0a..907bdf6 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -77,12 +77,11 @@ namespace Parser { } const unsigned increment = 2 + isFinalDefine; const auto beginning = lexed.begin() + i + increment; - parseTree << Define(isFinalDefine, current.toktext, parse( // TODO Find another way of choosing the tokens to parse - beginning, find_if(beginning, lexed.end(), [¤t](const tok& it){ - return it.line != current.line; - }) - )); - i += increment; + const auto end = find_if(beginning, lexed.end(), [¤t](const tok& it){ // TODO Find another way of choosing the tokens to parse + return it.line != current.line; + }); + parseTree << Define(isFinalDefine, current.toktext, parse(beginning, end)); + i += 1 + isFinalDefine + distance(beginning, end); } else if (next.toktype == LPAR) { parseTree << Call(current.toktext); } else