Remove globals from parser, use explicit structure.

This commit is contained in:
Stephen Dolan committed 2012-09-03 01:12:42 +01:00
1 parent 22ffc0fdfc
commit 52487ff812
2 files changed
+142 -111

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
struct jv_parser {
jv* stack;
int stackpos;
int stacklen;
jv next;
int hasnext;
char* tokenbuf;
int tokenpos;
int tokenlen;
struct dtoa_context dtoa;
enum {
JV_PARSER_NORMAL,
JV_PARSER_STRING,
JV_PARSER_STRING_ESCAPE
} st;
};