Write to file directly from stack debugging function

This commit is contained in:
Max Brunsfeld 2016-04-02 22:18:44 -07:00
parent d5c4dacb35
commit 91e3609fbf
3 changed files with 19 additions and 53 deletions

View file

@ -28,11 +28,8 @@
#define LOG_STACK() \
if (self->print_debugging_graphs) { \
char *graph_string = \
ts_stack_dot_graph(self->stack, self->language->symbol_names); \
fputs(graph_string, stderr); \
ts_stack_print_dot_graph(self->stack, self->language->symbol_names, stderr); \
fputs("\n\n", stderr); \
ts_free(graph_string); \
}
#define SYM_NAME(symbol) ts_language_symbol_name(self->language, symbol)