Remove the "previous" reference in Parser.hpp and start the iteration on lexed tokens at 0 instead of 1.
This commit is contained in:
parent
3ce905d602
commit
f308ad9da0
@ -7,8 +7,7 @@ namespace Parser {
|
|||||||
ParseTree parseVector(const vector<tok>& lexed) {
|
ParseTree parseVector(const vector<tok>& lexed) {
|
||||||
ParseTree parseTree = ParseTree();
|
ParseTree parseTree = ParseTree();
|
||||||
using namespace StandardComponents::types;
|
using namespace StandardComponents::types;
|
||||||
for (unsigned int i = 1; i < lexed.size(); ++i) {
|
for (unsigned int i = 0; i < lexed.size(); ++i) {
|
||||||
const auto& previous = lexed[i - 1];
|
|
||||||
const auto& current = lexed[i];
|
const auto& current = lexed[i];
|
||||||
const auto& next = lexed[i + 1];
|
const auto& next = lexed[i + 1];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user