pcpp handles space and newline characters in the macro argument correctly by replacing all of them with a single space.
However, it does not consider comments as whitespace.
This code:
def mkstr(x) #x
mkstr ( a // comment
b /* comment
*/ c)
results in
"a // comment b /* comment
*/ c"
This is fixed by simply including comment types in the value of Preprocessor.t_WS.
pcpp
handles space and newline characters in the macro argument correctly by replacing all of them with a single space. However, it does not consider comments as whitespace. This code:results in
This is fixed by simply including comment types in the value of
Preprocessor.t_WS
.