Handle token vectors with less than 2 values in the Parser::parseVector() method.
This commit is contained in:
parent
c7b5960783
commit
b7eb32c636
|
@ -7,11 +7,13 @@ namespace Parser {
|
||||||
ParseTree parseVector(const vector<tok>& lexed) {
|
ParseTree parseVector(const vector<tok>& lexed) {
|
||||||
ParseTree parseTree;
|
ParseTree parseTree;
|
||||||
using namespace StandardComponents::types;
|
using namespace StandardComponents::types;
|
||||||
|
if (lexed.size() > 1) {
|
||||||
for (unsigned int i = 0; i < lexed.size() - 1; ++i) {
|
for (unsigned int i = 0; i < lexed.size() - 1; ++i) {
|
||||||
const auto& current = lexed[i], next = lexed[i + 1];
|
const auto& current = lexed[i], next = lexed[i + 1];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return parseTree;
|
return parseTree;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue