hammer/src/parsers/unimplemented.c

34 lines
689 B
C
Raw Normal View History

2012-05-26 16:00:43 +02:00
#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,
.isValidRegular = h_false,
.isValidCF = h_false,
.desugar = NULL,
.compile_to_rvm = h_not_regular,
2012-05-26 16:00:43 +02:00
};
static HParser unimplemented = {
.vtable = &unimplemented_vt,
.env = NULL
};
const HParser* h_unimplemented() {
return &unimplemented;
}
2012-10-10 15:58:03 +02:00
const HParser* h_unimplemented__m(HAllocator* mm__) {
return &unimplemented;
}