diff --git a/src/test.cpp b/src/test.cpp index 2df37f5..23c2ece 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -511,9 +511,10 @@ private: if (self->empty()) { return true; } - auto token = self->nextToken(); + auto top = *(self->stackPtr - 1); + auto token = self->nextToken(top); // self->debugPrint(token); - MUSTTAIL return table[*(self->stackPtr - 1)][token](self); + MUSTTAIL return table[top][token](self); } static bool reject(Parser2 *self) { @@ -768,7 +769,7 @@ private: }; const char *bufBefore; - Symbol nextToken() { + Symbol nextToken(Symbol expected) { maybeSkipWs(); bufBefore = buf; if (len == 0) {