c2lang / c2c_native

C2 Compiler - written in C2
Apache License 2.0
24 stars 5 forks source link

comments after macro #11

Closed SchokiCoder closed 1 year ago

SchokiCoder commented 1 year ago

This C code:

#ifdef _WIN32
        // ...
#endif /* _WIN32 */

when brought to C2:

#if _WIN32
        // ...
#endif /* _WIN32 */

doesn't work in C2:

main.c2:71:8: error: unexpected character '/'
#endif /* _WIN32 */
       ^
1 error generated.

Is it intentional that comments cannot be placed after macros? If it is, add to documentation/changes_from_c.md?

bvdberg commented 1 year ago

Fixed in Tokenizer!