2 * @file src/monkey/seaspider/SeaspiderTest.c
3 * @brief C file to test Seaspider's parsing
10 #define PRE_PROC_DIR 0
11 #define MACRO_fun(arg1, arg2) (arg1 + arg2)
15 struct MyStruct *part;
26 static int fun(int arg1, int arg2)
32 int main(int args, const char * argv[])
34 /* variables declarations */
35 struct MyStruct whole;
41 /* Allocations and assignments */
44 whole.part->member = 2;
50 /* arithmetic and logic operations */
52 whole.part->member = (int)(whole.part->member + 5) - 6; // cast - multilevel assignment
56 for (i = 0; i < 2; i++) {
57 /* conditional expressions */
62 } else if (x > 0 || y == 4) {
70 fun(enumMember1, enumMember2);
73 fun(enumMember1, enumMember2 ? enumMember2 : enumMember1); // ternary operator
76 MACRO_fun(enumMember1, PRE_PROC_DIR); // preprocessing directive