summaryrefslogtreecommitdiff
path: root/upb/json/parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb/json/parser.h')
-rw-r--r--upb/json/parser.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/upb/json/parser.h b/upb/json/parser.h
index a5833e7..51578f2 100644
--- a/upb/json/parser.h
+++ b/upb/json/parser.h
@@ -69,15 +69,24 @@ UPB_DEFINE_STRUCT0(upb_json_parser,
int parser_stack[UPB_JSON_MAX_DEPTH];
int parser_top;
- // A pointer to the beginning of whatever text we are currently parsing.
- const char *text_begin;
+ // The handle for the current buffer.
+ const upb_bufhandle *handle;
- // We have to accumulate text for member names, integers, unicode escapes, and
- // base64 partial results.
+ // Accumulate buffer. See details in parser.rl.
const char *accumulated;
size_t accumulated_len;
- // TODO: add members and code for allocating a buffer when necessary (when the
- // member spans input buffers or contains escapes).
+ char *accumulate_buf;
+ size_t accumulate_buf_size;
+
+ // Multi-part text data. See details in parser.rl.
+ int multipart_state;
+ upb_selector_t string_selector;
+
+ // Input capture. See details in parser.rl.
+ const char *capture;
+
+ // Intermediate result of parsing a unicode escape sequence.
+ uint32_t digit;
));
UPB_BEGIN_EXTERN_C
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback