Created
July 1, 2014 14:50
-
-
Save rrichardson/cffdf210fb81b73ba77a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct HCountedArray_ { | |
size_t capacity; | |
size_t used; | |
HArena * arena; | |
struct HParsedToken_ **elements; | |
} HCountedArray; | |
typedef struct HBytes_ { | |
const uint8_t *token; | |
size_t len; | |
} HBytes; | |
typedef struct HParsedToken_ { | |
HTokenType token_type; | |
union { | |
HBytes bytes; | |
int64_t sint; | |
uint64_t uint; | |
double dbl; | |
float flt; | |
HCountedArray *seq; // a sequence of HParsedToken's | |
void *user; | |
}; | |
size_t index; | |
char bit_offset; | |
} HParsedToken; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment