]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/pp_va_args.qc
Implement subscripting for __VA_ARGS__, and added test-case. This only works on...
[xonotic/gmqcc.git] / tests / pp_va_args.qc
1 void print(...) = #1;
2
3 #define NOPARENS(...) __VA_ARGS__
4 #define callem(func, args) func NOPARENS(args)
5
6 #define callen(func, ...) func __VA_ARGS__##[0]
7
8 void main() {
9     print(NOPARENS("hello ", "world\n"));
10     callem(print, ("Yay", ", there\n"));
11     callen(print, ("Woah",", there\n"));
12 }