Custom printers for user token types

I did this in a hurry, but it appears to work locally. I tested it with
a couple boring custom token type printers.
This commit is contained in:
Steven Dee 2016-03-17 00:25:31 -04:00
parent bfb07bbbf6
commit 2b6b300f91
4 changed files with 88 additions and 42 deletions

View file

@ -422,6 +422,18 @@ struct HParserVtable_ {
bool higher; // false if primitive
};
// {{{ Token type registry internal
typedef struct HTTEntry_ {
const char* name;
HTokenType value;
void (*unamb_sub)(const HParsedToken *tok, struct result_buf *buf);
} HTTEntry;
const HTTEntry* h_get_token_type_entry(HTokenType token_type);
// }}}
bool h_false(void*);
bool h_true(void*);
bool h_not_regular(HRVMProg*, void*);