From 76975f56ecd12a6af0f4c028f47d65ede7355bf0 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Wed, 15 Jun 2016 11:06:00 -0700 Subject: [PATCH] Display node positions in tooltips in debugging graphs --- src/runtime/stack.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/runtime/stack.c b/src/runtime/stack.c index 7b13c3c0..c3412e08 100644 --- a/src/runtime/stack.c +++ b/src/runtime/stack.c @@ -545,8 +545,11 @@ bool ts_stack_print_dot_graph(Stack *self, const char **symbol_names, FILE *f) { fprintf(f, "shape=point margin=0 label=\"\""); else fprintf(f, "label=\"%d\"", node->state); - fprintf(f, " tooltip=\"error-count:%u, error-cost:%u\"];\n", - node->error_depth, node->error_cost); + fprintf( + f, + " tooltip=\"position: %lu,%lu\nerror-count: %u\nerror-cost: %u\"];\n", + node->position.rows, node->position.columns, node->error_depth, + node->error_cost); for (int j = 0; j < node->link_count; j++) { StackLink link = node->links[j];