Handle token vectors with less than 2 values in the Parser::parseVector() method.

This commit is contained in:
Username404-59 2021-07-07 17:40:04 +02:00
parent c7b5960783
commit b7eb32c636
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 4 additions and 2 deletions

View File

@ -7,10 +7,12 @@ namespace Parser {
ParseTree parseVector(const vector<tok>& 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;
}