Refactor ALL the things!
This commit is contained in:
parent
6a2f10df0c
commit
f2def8fa05
28 changed files with 930 additions and 855 deletions
17
src/parsers/nothing.c
Normal file
17
src/parsers/nothing.c
Normal 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 = ¬hing_vt; ret->env = NULL;
|
||||
return (const HParser*)ret;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue