Added new build system
This commit is contained in:
commit
b0f567c090
27 changed files with 2255 additions and 217 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue