extern variables and object-like macro consts

This commit is contained in:
2026-06-17 21:52:05 +02:00
parent f5605fd3ec
commit 19e9fbdd4b
33 changed files with 3136 additions and 116 deletions
+34
View File
@@ -21,6 +21,37 @@ main :: func() void {
_ = native.imported_apply(double_value, 21)
_ = call_mapper(double_value)
_ = native.configured_value(9)
_ = native.IMPORTED_SHADOW_OBJECT
_ = native.IMPORTED_SHADOW_FUNCTION
native.imported_global = native.IMPORTED_MAGIC
native.imported_record_global.value = native.IMPORTED_MAGIC
color native.Imported_Color :: native.IMPORTED_COLOR
_ = native.imported_check_state(
color,
native.IMPORTED_MAGIC,
native.imported_const_global,
native.imported_global,
native.imported_record_global.value,
native.IMPORTED_OCTAL,
native.IMPORTED_UINT,
native.IMPORTED_REDEFINED,
native.IMPORTED_ACTIVE_AFTER_INACTIVE_UNDEF,
native.IMPORTED_REPEAT,
native.IMPORTED_HEX_E,
native.IMPORTED_NEG_DECIMAL,
native.IMPORTED_NEG_HEX,
native.IMPORTED_NEG_UINT,
native.IMPORTED_FLOAT,
native.IMPORTED_DOUBLE,
)
partial native.Imported_Color :: native.IMPORTED_PARTIAL_COLOR
nested native.Imported_Zero_Outer :: native.IMPORTED_ZERO_NESTED
first_union native.Imported_Zero_Union :: native.IMPORTED_FIRST_UNION
_ = native.imported_check_zero_state(partial, nested, first_union)
native.imported_mutable_array_record.values[0] = 42
_ = native.imported_check_array_record()
conversions native.Imported_Conversions :: native.IMPORTED_CONVERSIONS
_ = native.imported_check_conversions(conversions)
signed i8 :: -2
unsigned u16 :: 3
float_value f32 :: 4.0
@@ -28,4 +59,7 @@ main :: func() void {
pointer *u8 :: "ok".ptr
nullable ?*u8 :: pointer
_ = native.imported_variadic(7, signed, unsigned, float_value, c_float_value, pointer, nullable)
inline_scalar c_int :: native.imported_inline(5)
inline_record native.Imported_Value :: native.imported_inline_record(native.Imported_Value { value = 7 })
_ = native.imported_check_inline(inline_scalar, inline_record.value)
}