diff options
Diffstat (limited to 'src/viz.c')
-rw-r--r-- | src/viz.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -152,8 +152,8 @@ viz_node(Node *node) { | |||
152 | } | 152 | } |
153 | 153 | ||
154 | void | 154 | void |
155 | viz_ast(ParseTree *parse_tree) { | 155 | viz_ast(Root *roots) { |
156 | if (parse_tree == NULL) { | 156 | if (roots == NULL) { |
157 | return; | 157 | return; |
158 | } | 158 | } |
159 | printf("digraph ast {\n"); | 159 | printf("digraph ast {\n"); |
@@ -161,9 +161,9 @@ viz_ast(ParseTree *parse_tree) { | |||
161 | printf("ranksep=\"0.95 equally\";\n"); | 161 | printf("ranksep=\"0.95 equally\";\n"); |
162 | printf("nodesep=\"0.5 equally\";\n"); | 162 | printf("nodesep=\"0.5 equally\";\n"); |
163 | printf("overlap=scale;\n"); | 163 | printf("overlap=scale;\n"); |
164 | for (size_t i = 0; i < array_size(parse_tree->roots); ++i) { | 164 | for (size_t i = 0; i < array_size(roots); ++i) { |
165 | printf("subgraph %zu {\n", i); | 165 | printf("subgraph %zu {\n", i); |
166 | Node *root = parse_tree->roots[array_size(parse_tree->roots) - 1 - i]; | 166 | Node *root = roots[array_size(roots) - 1 - i]; |
167 | viz_node(root); | 167 | viz_node(root); |
168 | printf("}\n"); | 168 | printf("}\n"); |
169 | } | 169 | } |