Allow callbacks to be specified for debug output

This commit is contained in:
Max Brunsfeld 2014-10-13 01:02:12 -07:00
parent 71cc7a2dc2
commit c594208ab8
9 changed files with 226 additions and 69 deletions

View file

@ -12,14 +12,16 @@ typedef struct {
TSStack stack;
TSStack right_stack;
size_t total_chars;
int debug;
TSTree *lookahead;
TSTree *next_lookahead;
const TSLanguage *language;
TSDebugger debugger;
} TSParser;
TSParser ts_parser_make(const TSLanguage *);
TSParser ts_parser_make();
void ts_parser_destroy(TSParser *);
void ts_parser_debug_parse(TSParser *, TSDebugger);
void ts_parser_debug_lex(TSParser *, TSDebugger);
const TSTree *ts_parser_parse(TSParser *, TSInput, TSInputEdit *);
#ifdef __cplusplus