Added a void* user_data pointer to HPredicate

This commit is contained in:
Dan Hirsch 2013-11-23 13:01:55 -06:00
parent e487d5435c
commit 69e84bcbb0
9 changed files with 28 additions and 22 deletions

View file

@ -375,7 +375,7 @@ HParseResult *h_llk_parse(HAllocator* mm__, const HParser* parser, HInputStream*
tok = (HParsedToken *)x->reshape(make_result(arena, tok), x->user_data);
// call validation and semantic action, if present
if(x->pred && !x->pred(make_result(tarena, tok)))
if(x->pred && !x->pred(make_result(tarena, tok), x->user_data))
goto no_parse; // validation failed -> no parse
if(x->action)
tok = (HParsedToken *)x->action(make_result(arena, tok), x->user_data);