This commit is contained in:
agra
2026-02-11 02:22:00 +02:00
parent 89fc6427c4
commit 7bb4fe0c5f
7 changed files with 251 additions and 14 deletions

View File

@@ -25,8 +25,11 @@ main :: () {
list := List(s32).{};
append(list, 3);
append(list, 1);
append(list, 4);
append(list, 1);
append(list, 5);
list.append(3);
list.append(4);
list.append(1);
list.append(5);
print("{}\n", list);
}

View File

@@ -3,6 +3,9 @@ write :: (str: string) -> void #builtin;
sqrt :: (x: $T) -> T #builtin;
size_of :: ($T: Type) -> s64 #builtin;
alloc :: (size: s64) -> string #builtin;
malloc :: (size: s64) -> *void #builtin;
memcpy :: (dst: *void, src: *void, size: s64) -> *void #builtin;
free :: (ptr: *void) -> void #builtin;
type_of :: (val: $T) -> Type #builtin;
type_name :: ($T: Type) -> string #builtin;
field_count :: ($T: Type) -> s64 #builtin;