First off, I really like this project! I have given a whirl at an extended C myself but this is probably the best variant I've seen about.
So I don't know if this is intended behavior, but this code snippet:
#define CAT2_(A,...) A##__VA_ARGS__
#define CAT2(...) CAT2_(__VA_ARGS__)
#define STRINGIFY_(...) #__VA_ARGS__
#define STRINGIFY(...) STRINGIFY_(__VA_ARGS__)
#def IMPORT(Module)
#ifndef CAT2(Module,_h)
#define CAT2(Module,_h)
#include STRINGIFY(CAT2(Module,.h))
#endif
#enddef
IMPORT(stdio)
IMPORT(stdio)
int main(void)
{
}
leads to very cryptic errors:
Cake 0.14.00 (x86_x64_gcc)
main.c:8:28:
error 970: expected token 'identifier', got 'new line'
8 |
|~
main.c:9:28:
error 970: expected token 'identifier', got 'new line'
9 |
|~
While having only one IMPORT(stdio) compiles and includes <stdio.h> as one would expect.
First off, I really like this project! I have given a whirl at an extended C myself but this is probably the best variant I've seen about.
So I don't know if this is intended behavior, but this code snippet:
leads to very cryptic errors:
While having only one
IMPORT(stdio)compiles and includes <stdio.h> as one would expect.