Fix some if directive stuff. Fix a property output issue. Will be deprecated next commit anyway.

This commit is contained in:
2025-09-17 12:30:36 +02:00
parent 7fefe0ecf6
commit 8b2141df16
19 changed files with 174 additions and 95 deletions

View File

@@ -372,7 +372,7 @@ pretty_print_node :: (node : *AST_Node, indentation : int, builder : *String_Bui
pretty_print_node(body, indentation + 4, builder);
// append(builder, ")");
if node.children.count == 3 {
if node.children.count == 3 { //@Note: Else branch
append(builder, "\n");
pretty_print_node(node.children[2], indentation + 4, builder);
}
@@ -485,7 +485,9 @@ pretty_print_declaration :: (declaration : *AST_Node, indentation : int, builder
} else if declaration.kind == .CBuffer {
append(builder, "constant_buffer ");
}
print_to_builder(builder, "%", declaration.name);
if declaration.kind != .If_Directive {
print_to_builder(builder, "%", declaration.name);
}
}
if declaration.kind == .Function && declaration.token.kind == .TOKEN_IDENTIFIER{