wrap all allocs of HParser in helper h_new_parser
This commit is contained in:
parent
3dfc313118
commit
88091b602f
23 changed files with 44 additions and 113 deletions
|
|
@ -39,9 +39,6 @@ const HParser* h_optional(const HParser* p) {
|
|||
const HParser* h_optional__m(HAllocator* mm__, const HParser* p) {
|
||||
// TODO: re-add this
|
||||
//assert_message(p->vtable != &ignore_vt, "Thou shalt ignore an option, rather than the other way 'round.");
|
||||
HParser *ret = h_new(HParser, 1);
|
||||
ret->vtable = &optional_vt;
|
||||
ret->env = (void*)p;
|
||||
return ret;
|
||||
return h_new_parser(mm__, &optional_vt, (void *)p);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue