Added new build system

This commit is contained in:
Dan Hirsch 2013-07-10 21:32:05 +02:00
commit b0f567c090
27 changed files with 2255 additions and 217 deletions

View file

@ -8,9 +8,12 @@ HCFChoice *h_desugar(HAllocator *mm__, HCFStack *stk__, const HParser *parser) {
if (nstk__ == NULL) {
nstk__ = h_cfstack_new(mm__);
}
if(nstk__->prealloc == NULL)
nstk__->prealloc = h_new(HCFChoice, 1);
// we're going to do something naughty and cast away the const to memoize
assert(parser->vtable->desugar != NULL);
((HParser *)parser)->desugared = nstk__->prealloc;
parser->vtable->desugar(mm__, nstk__, parser->env);
((HParser *)parser)->desugared = nstk__->last_completed;
if (stk__ == NULL)
h_cfstack_free(mm__, nstk__);
} else if (stk__ != NULL) {