Swinging in a different direction, different syntax
This commit is contained in:
55
ideas.cpp
55
ideas.cpp
@@ -1,3 +1,56 @@
|
||||
|
||||
call:(param:U32)U32{
|
||||
|
||||
}
|
||||
|
||||
@stringify
|
||||
Enumeration:enum{
|
||||
None,
|
||||
Thing = 1 << 10,
|
||||
Thing2,
|
||||
Thing3,
|
||||
}
|
||||
|
||||
@sllqueue()
|
||||
@sllqueue(prefix=thing_scope, next=next_scope)
|
||||
Thing:struct{
|
||||
next: Thing*;
|
||||
first: Thing*;
|
||||
last: Thing*;
|
||||
next_scope: Thing*;
|
||||
|
||||
val: U32[16];
|
||||
str: String;
|
||||
embed: struct{
|
||||
thing: S32;
|
||||
}
|
||||
}
|
||||
|
||||
@register(sllqueue, first, last, next)
|
||||
sllqueue_push:(base:T1, child:T2) void {
|
||||
if(base.first == 0){
|
||||
base.first = base.last = child;
|
||||
}
|
||||
else{
|
||||
base.last = base.last.next = child;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
function void
|
||||
thing_sllqueue_push(){
|
||||
|
||||
}
|
||||
|
||||
function void
|
||||
thing_scope_sllqueue_push(){
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
Builtin types:
|
||||
B8,B16,B32,B64
|
||||
S8,S16,S32,S64
|
||||
@@ -42,3 +95,5 @@ return 0;
|
||||
if(a){}elseif(b){}else{}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user