Refactor ALL the things!
This commit is contained in:
parent
6a2f10df0c
commit
f2def8fa05
28 changed files with 930 additions and 855 deletions
26
src/parsers/unimplemented.c
Normal file
26
src/parsers/unimplemented.c
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue