Fuse whitespace into string
This commit is contained in:
@@ -278,8 +278,7 @@ inline WeaselJsonStatus n_object3(Parser3 *self) {
|
|||||||
case ',':
|
case ',':
|
||||||
++self->buf;
|
++self->buf;
|
||||||
self->pop();
|
self->pop();
|
||||||
if (auto s =
|
if (auto s = self->push({N_STRING, T_COLON, N_VALUE, N_OBJECT3})) {
|
||||||
self->push({N_WHITESPACE, N_STRING, T_COLON, N_VALUE, N_OBJECT3})) {
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
MUSTTAIL return Parser3::keepGoing(self);
|
MUSTTAIL return Parser3::keepGoing(self);
|
||||||
@@ -351,6 +350,13 @@ inline WeaselJsonStatus n_array3(Parser3 *self) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline WeaselJsonStatus n_string(Parser3 *self) {
|
inline WeaselJsonStatus n_string(Parser3 *self) {
|
||||||
|
assert(self->len() != 0);
|
||||||
|
while (tables.whitespace[uint8_t(*self->buf)]) {
|
||||||
|
++self->buf;
|
||||||
|
if (self->buf == self->bufEnd) {
|
||||||
|
return WeaselJson_AGAIN;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (*self->buf != '"') {
|
if (*self->buf != '"') {
|
||||||
return WeaselJson_REJECT;
|
return WeaselJson_REJECT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user