45 lines
667 B
C++
45 lines
667 B
C++
Builtin types:
|
|
B8,B16,B32,B64
|
|
S8,S16,S32,S64
|
|
U8,U16,U32,U64
|
|
SizeI, SizeU
|
|
F32, F64
|
|
|
|
Decls:
|
|
S32 *var;
|
|
S32 (*func)();
|
|
S32 *var[expr][expr];
|
|
S32 **var;
|
|
|
|
Global scope:
|
|
function S32
|
|
do_thing(S32 a, U32 b){
|
|
stmt_list
|
|
}
|
|
|
|
function S32
|
|
do_thing(S32 a, S32 b);
|
|
|
|
typedef struct Thing Thing;
|
|
struct Thing{};
|
|
typedef struct Thing{} Thing;
|
|
|
|
typedef enum Thingy Thingy;
|
|
enum Thingy{};
|
|
typedef enum Thingy{} Thingy;
|
|
|
|
global S32 variable = expr | compound;
|
|
|
|
// typedef S32 NewName;
|
|
// typedef S32 BaseFunctionType(S32 thing);
|
|
// typedef S32 (*FunctionPointer)(S32 thing);
|
|
|
|
Local scope-(stmts):
|
|
S32 variable = expr;
|
|
variable = expr;
|
|
variable++;
|
|
return 0;
|
|
if(a){}elseif(b){}else{}
|
|
|
|
|