move hide behind @ and specify with :

This commit is contained in:
2026-08-10 22:45:41 +02:00
parent 5244bfbf1b
commit ba6052eef3
27 changed files with 162 additions and 149 deletions
+17 -14
View File
@@ -1,26 +1,28 @@
hide(package) helper func() i32 {
@hide:package
helper func() i32 {
thing Thing := Thing { value = value }
return thing.value
}
hide Thing :: struct {
@hide
Thing :: struct {
value i32
}
hide Local_Union :: union {
@hide Local_Union :: union {
value i32
}
hide Local_Enum :: enum {
@hide Local_Enum :: enum {
value
}
hide Local_Opaque :: opaque
hide Local_Distinct :: distinct i32
hide Local_Alias :: alias i32
@hide Local_Opaque :: opaque
@hide Local_Distinct :: distinct i32
@hide Local_Alias :: alias i32
hide value :: 1
hide mutable_value i32 := 1
@hide value :: 1
@hide mutable_value i32 := 1
_foreign c_func() i32 {
return 1
@@ -30,23 +32,24 @@ _C_Record :: c_struct {
value c_int
}
hide local_foreign c_func() i32 {
@hide local_foreign c_func() i32 {
return 1
}
hide Local_C_Record :: c_struct {
@hide Local_C_Record :: c_struct {
value c_int
}
hide(file) file_helper func() i32 {
@hide:file
file_helper func() i32 {
return 1
}
hide(file) File_Thing :: struct {
@hide:file File_Thing :: struct {
value i32
}
hide(file) file_value :: 1
@hide:file file_value :: 1
from_a func() i32 {
record Local_C_Record := Local_C_Record { value = 0 }
+3 -3
View File
@@ -5,15 +5,15 @@ Box :: struct {
_value i32
}
hide(file) file_helper func() i32 {
@hide:file file_helper func() i32 {
return 2
}
hide(file) File_Thing :: struct {
@hide:file File_Thing :: struct {
value i32
}
hide(file) file_value :: 2
@hide:file file_value :: 2
from_b func(_input i32) i32 {
_local Box := Box { _value = _input }