Restructure

This commit is contained in:
Krzosa Karol
2022-06-14 14:28:29 +02:00
parent f223086ef3
commit e4e939ec04
12 changed files with 600 additions and 0 deletions

69
programs/order2.kl Normal file
View File

@@ -0,0 +1,69 @@
Str16 :: String16
arena_pointer: *Arena = 0
order2_arena: Arena
no_type := order2_arena
Arena :: struct
next: *Arena
data: *S64
len : S64
cap : S64
string16: Str16
String16 :: struct
data: *void
len : S64
thing := arena_pointer.len
with_type: Arena = order2_arena
test_dot := with_type.len
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
boolean := i > 2
CONST :: 23 == 23
CONST_FLOAT :: 23.52
j: *S64
*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
*/