Ast Render no longer outputs erroneous semicolon

closes #813
This commit is contained in:
Jimmi Holst Christensen committed 2018-03-07 10:39:32 +01:00
1 parent d96dd5bc32
commit bb80daf509
4 files changed
+22 -17

No files matched your search

+4 -1
View File
@@ -490,7 +490,10 @@ static void render_node_extra(AstRender *ar, AstNode *node, bool grouped) {
AstNode *statement = node->data.block.statements.at(i);
print_indent(ar);
render_node_grouped(ar, statement);
fprintf(ar->f, ";");
if (!statement_terminates_without_semicolon(statement))
fprintf(ar->f, ";");
fprintf(ar->f, "\n");
}
ar->indent -= ar->indent_size;