feat: support existing io.print formatting

This commit is contained in:
2026-11-01 11:37:46 +01:00
parent e036070bf2
commit 1f457d6b41
23 changed files with 895 additions and 116 deletions
+15 -5
View File
@@ -220,12 +220,13 @@ NodeData :: union {
binary_operator BinaryOperator
}
@hide:file file_local_flag u8 :: 0b0001
@hide:file foreign_type_flag u8 :: 0b0010
@hide:file variadic_flag u8 :: 0b0100
@hide:file opaque_flag u8 :: 0b1000
@hide:file optional_match_flag u8 :: 0b00010000
@hide:file file_local_flag u8 :: 0b00000001
@hide:file foreign_type_flag u8 :: 0b00000010
@hide:file variadic_flag u8 :: 0b00000100
@hide:file opaque_flag u8 :: 0b00001000
@hide:file optional_match_flag u8 :: 0b00010000
@hide:file compound_assignment_flag u8 :: 0b00100000
@hide:file package_local_flag u8 :: 0b01000000
@hide:file
Node :: struct {
@@ -1208,6 +1209,15 @@ file_local proc(tree @Tree, id NodeId) bool {
return (tree.storage.nodes.items[usize(id)].flags & file_local_flag) != 0
}
set_package_local proc(builder @mut Builder, id NodeId) void {
node :: &builder.storage.nodes.items[usize(id)]
node.flags = node.flags | package_local_flag
}
package_local proc(tree @Tree, id NodeId) bool {
return (tree.storage.nodes.items[usize(id)].flags & package_local_flag) != 0
}
set_callable_foreign proc(builder @mut Builder, id NodeId) void {
node :: &builder.storage.nodes.items[usize(id)]
node.flags = node.flags | foreign_type_flag