forked from weaselab/weaseljson
Don't list all terminal statuses for weaseljson
Also simplifies codegen slightly presumably. OK and AGAIN should be the only non-terminal statuses ever.
This commit is contained in:
+2
-2
@@ -1085,7 +1085,7 @@ inline WeaselJsonStatus Parser3::parse(char *buf, int len) {
|
|||||||
// range.
|
// range.
|
||||||
ContinuationStatus status =
|
ContinuationStatus status =
|
||||||
symbolTables.continuations[top()](this, buf, buf + len);
|
symbolTables.continuations[top()](this, buf, buf + len);
|
||||||
if (status == WeaselJson_REJECT || status == WeaselJson_OVERFLOW) {
|
if (status > WeaselJson_AGAIN) {
|
||||||
this->terminalStatus = WeaselJsonStatus(status);
|
this->terminalStatus = WeaselJsonStatus(status);
|
||||||
}
|
}
|
||||||
return WeaselJsonStatus(status);
|
return WeaselJsonStatus(status);
|
||||||
@@ -1095,7 +1095,7 @@ inline WeaselJsonStatus Parser3::parse(char *buf, int len) {
|
|||||||
while ((result = symbolTables.continuations[top()](
|
while ((result = symbolTables.continuations[top()](
|
||||||
this, stashBufForTrampoline, buf + len)) == kBounce)
|
this, stashBufForTrampoline, buf + len)) == kBounce)
|
||||||
;
|
;
|
||||||
if (result == WeaselJson_REJECT || result == WeaselJson_OVERFLOW) {
|
if (result > WeaselJson_AGAIN) {
|
||||||
this->terminalStatus = WeaselJsonStatus(result);
|
this->terminalStatus = WeaselJsonStatus(result);
|
||||||
}
|
}
|
||||||
return WeaselJsonStatus(result);
|
return WeaselJsonStatus(result);
|
||||||
|
|||||||
Reference in New Issue
Block a user