diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index e65b13b..901f31e 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -7,10 +7,12 @@ namespace Parser { ParseTree parseVector(const vector& lexed) { ParseTree parseTree; using namespace StandardComponents::types; - for (unsigned int i = 0; i < lexed.size() - 1; ++i) { - const auto& current = lexed[i], next = lexed[i + 1]; + if (lexed.size() > 1) { + for (unsigned int i = 0; i < lexed.size() - 1; ++i) { + const auto& current = lexed[i], next = lexed[i + 1]; + } } return parseTree; }