Parsing complete mostly, ordering, resolving, C++ tests

This commit is contained in:
Krzosa Karol
2022-05-12 17:10:24 +02:00
parent feae74b0b9
commit 9d54ed8195
37 changed files with 2748 additions and 5341 deletions

34
test.cc
View File

@@ -1,6 +1,5 @@
Thing :: const: *U32 = 0;
CONST_VAL::const = 185210591;
new_function::(Thing:[32]U32): U32;
@test(size = 4096)
@@ -258,17 +257,30 @@ Parser :: struct{
//@using token_array: Tokens;
}
/*
@register_tag(sllqueue)
@params(next=next,last=last,first=first)
function void
struct_type_lower_var_name_lower_push(struct_type *parent, var_type *child){
if(parent->first == 0){
- parent->first = parent->last = child;
function_test::(a:U32, b:U32):*U32{
scratch := get_scratch();
defer{release_scratch(scratch);}
if a > 10 {
c := b + 10;
b = c;
}
else{
- parent->last = parent->last->next = child;
else if a == 20 {
d := 1241215;
b = d;
}
else {
c := b+20;
b = c;
}
for {
c: U32 = b + 1;
}
for i:=0; i < 10; i++ {
print(i);
}
return *b;
}
*/