nim-lang / c2nim

c2nim is a tool to translate Ansi C code to Nim. The output is human-readable Nim code that is meant to be tweaked by hand before and after the translation process.
MIT License
509 stars 63 forks source link

Token pasting operator `##` #224

Open mantielero opened 3 years ago

mantielero commented 3 years ago

I think the token pasting operator is not supported. The following header fails:

#define DEFINE_STANDARD_HANDLECLASS(C1,C2,BC) class C1; typedef Handle(C1) Handle_##C1;

when executed:

$ c2nim --cpp --header --strict test.hpp 
/tmp/test.hpp(1, 87) Error: token expected: :: but got: )