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:
parent
bfb07bbbf6
commit
2b6b300f91
4 changed files with 88 additions and 42 deletions
|
|
@ -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*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue