88 lines
1.0 KiB
Plaintext
88 lines
1.0 KiB
Plaintext
Str16 :: String16
|
|
// arena_poInter: *Arena = null
|
|
thing: Arena
|
|
no_type := thing
|
|
constant_access := Arena.constant_inside
|
|
|
|
arena := Arena(
|
|
// next = null,
|
|
// data = null,
|
|
len = 1000,
|
|
cap = 1000,
|
|
)
|
|
|
|
// lambda_value := (val: Int) // @todo
|
|
// return
|
|
|
|
Arena :: struct
|
|
// arena: Arena
|
|
next: *Arena
|
|
data: *Int
|
|
len : Int
|
|
cap : Int
|
|
|
|
Sub :: struct
|
|
len: Int
|
|
Sub_Sub :: struct
|
|
len: Int
|
|
|
|
get_len :: (s: *Arena): Int // @todo
|
|
return s.next.len
|
|
|
|
constant_inside :: 10000
|
|
|
|
// subarena: Arena.Sub // @todo
|
|
string16: Str16
|
|
|
|
String16 :: struct
|
|
data: *Void
|
|
len : Int
|
|
|
|
with_type: Arena = thing
|
|
poInter := &with_type
|
|
deref := *poInter
|
|
|
|
|
|
test_assignments :: ()
|
|
i := 0
|
|
i += 4
|
|
i -= 1
|
|
i *= 2
|
|
i /= 2
|
|
i %= 2
|
|
i = 2
|
|
i &= 2
|
|
i |= 2
|
|
i >>= 2
|
|
i <<= 2
|
|
|
|
i = i > 2
|
|
CONST :: 23 == 23
|
|
|
|
j: *Int
|
|
*j = 1
|
|
/* invalid
|
|
8 = 32
|
|
i + 4 = 32
|
|
i += "String"
|
|
|
|
*/
|
|
|
|
|
|
/*
|
|
for
|
|
pass
|
|
for i:=0, i < 10, i+=1
|
|
pass
|
|
for array
|
|
pass
|
|
for it in array
|
|
pass
|
|
for it,i in array
|
|
pass
|
|
for i in 0..10
|
|
pass
|
|
|
|
|
|
|
|
*/ |