Files
corelang/examples/polymorphism.core
2023-03-29 11:42:54 +02:00

29 lines
655 B
Core

/*
PushStruct :: (a: *MA.Arena, $T: Type): *$T
size := size_of(Type)
result := PushSize(a, size)
return result
Array :: struct($T: Type)
data: *T
len: int
cap: int
Array(int)
QueueAddSLL(list: $List, node: $Node, first: #Identifier = first, last: #Identifier = last, next: #Identifier = next)
ArrayAdd(array: $Array, item: $Item, data: #Identifier = data, len: #Identifier = len, len: #Identifier = cap)
QueueAddSLL(list: $List, node: $Node, $first = first, $last = last, $next = next)
if list.first == 0
list.first = list.last = node
else
list.last = list.last.next = node
*/
main :: (argc: int, argv: **char): int
$i := 10
return 0