diff --git a/examples/push_struct.core b/examples/push_struct.core new file mode 100644 index 0000000..a91df95 --- /dev/null +++ b/examples/push_struct.core @@ -0,0 +1,15 @@ +#import "Arena.core" + +// @todo: +// Add new special type #Type_Size + +PushStruct :: (a: *Arena, type: Type /*#Type_Size*/): *void + ti := GetTypeInfo(type) + result := PushSize(a, ti.size->Base.SizeU) + return result + +main :: (argc: int, argv: **char): int + arena: Arena + a: *int = PushStruct(&arena, int) + + return 0 \ No newline at end of file