X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=test%2Fast-macros.h;h=5b92a388c41a231975f61e028d0ce587093f02bc;hb=bcd8138e43e7c3d9ff5628f45f9c71d370b0830b;hp=8c6d6c62c3243c1c5408811941f9782dde4dcc25;hpb=904196e9bb6818e5080de6ced1833f3d207242fc;p=xonotic%2Fgmqcc.git diff --git a/test/ast-macros.h b/test/ast-macros.h index 8c6d6c6..5b92a38 100644 --- a/test/ast-macros.h +++ b/test/ast-macros.h @@ -47,6 +47,17 @@ do { \ #define BIN(op, a, b) \ (ast_expression*)ast_binary_new(ctx, INSTR_##op, (ast_expression*)(a), (ast_expression*)(b)) +#define CALL(what) \ +do { \ + ast_call *call = ast_call_new(ctx, (ast_expression*)what); \ + +#define CALLPARAM(x) \ + assert(ast_call_params_add(call, (ast_expression*)x)); + +#define ENDCALL() \ + STATE(call); \ +} while(0) + #define WHILE(cond) \ do { \ ast_expression *wh_cond = (ast_expression*)(cond); \