Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Created July 1, 2014 14:50
Show Gist options
  • Save rrichardson/cffdf210fb81b73ba77a to your computer and use it in GitHub Desktop.
Save rrichardson/cffdf210fb81b73ba77a to your computer and use it in GitHub Desktop.
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