Pass symbol on top of stack to nextToken
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user