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

17
src/parsers/nothing.c Normal file
View file

@ -0,0 +1,17 @@
#include "parser_internal.h"
static HParseResult* parse_nothing() {
// not a mistake, this parser always fails
return NULL;
}
static const HParserVtable nothing_vt = {
.parse = parse_nothing,
};
const HParser* h_nothing_p() {
HParser *ret = g_new(HParser, 1);
ret->vtable = &nothing_vt; ret->env = NULL;
return (const HParser*)ret;
}