Fixed some error handling for invalid if statements. Started if codegen.
This commit is contained in:
7
AST.jai
7
AST.jai
@@ -149,7 +149,12 @@ Children_Print_Flags :: enum_flags {
|
||||
}
|
||||
|
||||
pretty_print_block :: (node : *AST_Node, indentation : int, builder : *String_Builder, skip_indent := false) {
|
||||
pretty_print_children(node, indentation, builder, flags = .NewLine | .Dont_Skip_Indent_On_First);
|
||||
if node.children.count == 0 {
|
||||
indent(builder, indentation);
|
||||
append(builder, "()");
|
||||
} else {
|
||||
pretty_print_children(node, indentation, builder, flags = .NewLine | .Dont_Skip_Indent_On_First);
|
||||
}
|
||||
}
|
||||
|
||||
pretty_print_children :: (parent : *AST_Node, indentation : int, builder : *String_Builder, flags : Children_Print_Flags = .Separator, skip_indent := false) {
|
||||
|
||||
Reference in New Issue
Block a user