Refactor ALL the things!

This commit is contained in:
Dan Hirsch 2012-05-26 16:00:43 +02:00
parent 6a2f10df0c
commit f2def8fa05
28 changed files with 930 additions and 855 deletions

View file

@ -0,0 +1,26 @@
#include "parser_internal.h"
static HParseResult* parse_unimplemented(void* env, HParseState *state) {
(void) env;
(void) state;
static HParsedToken token = {
.token_type = TT_ERR
};
static HParseResult result = {
.ast = &token
};
return &result;
}
static const HParserVtable unimplemented_vt = {
.parse = parse_unimplemented,
};
static HParser unimplemented = {
.vtable = &unimplemented_vt,
.env = NULL
};
const HParser* h_unimplemented() {
return &unimplemented;
}