Skip to content
Snippets Groups Projects
Commit 92f2eecf authored by Dan Hirsch's avatar Dan Hirsch
Browse files

Remove unneeded desugaring code.

parent ec404ca8
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ HCFChoice *h_desugar(HAllocator *mm__, HCFStack *stk__, const HParser *parser) {
if (nstk__ == NULL) {
nstk__ = h_cfstack_new(mm__);
}
// we're going to do something naughty and cast away the const to memoize
assert(parser->vtable->desugar != NULL);
parser->vtable->desugar(mm__, nstk__, parser->env);
((HParser *)parser)->desugared = nstk__->last_completed;
if (stk__ == NULL)
......
......@@ -12,16 +12,10 @@ static HParseResult* parse_unimplemented(void* env, HParseState *state) {
return &result;
}
static HCFChoice* desugar_unimplemented(HAllocator *mm__, HCFStack *stk__, void *env) {
assert_message(0, "'h_unimplemented' is not context-free, can't be desugared");
return NULL;
}
static const HParserVtable unimplemented_vt = {
.parse = parse_unimplemented,
.isValidRegular = h_false,
.isValidCF = h_false,
.desugar = desugar_unimplemented,
.compile_to_rvm = h_not_regular,
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment