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,
|
2012-12-18 18:10:40 -05:00
|
|
|
.isValidRegular = h_false,
|
|
|
|
|
.isValidCF = h_false,
|
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;
|
|
|
|
|
}
|