Adding desugar

This commit is contained in:
Rob Zinkov 2013-03-17 13:25:02 -07:00
parent f7246e9589
commit 4e11c90664
10 changed files with 15 additions and 13 deletions

View file

@ -31,7 +31,7 @@ static HCFChoice* desugar_ignoreseq(HAllocator *mm__, void *env) {
HCFSequence *hseq = h_new(HCFSequence, 1);
hseq->items = h_new(HCFChoice*, 1+seq->len);
for (size_t i=0; i<seq->len; ++i) {
hseq->items[i] = seq->parsers[i]->vtable->desugar(mm__, seq->parsers[i]->env);
hseq->items[i] = h_desugar(mm__, seq->parsers[i]);
}
hseq->items[seq->len] = NULL;
HCFChoice *ret = h_new(HCFChoice, 1);