Closed LynnKirby closed 3 years ago
https://github.com/ned14/pcpp/blob/26db1a47d132e7ab4a49780dc165f14f6fc767f5/pcpp/preprocessor.py#L128
The t_CPP_FLOAT regex has spaces in it. Since spaces are interpreted literally, this never matches a float literal.
t_CPP_FLOAT
I only noticed this issue when using the parsed tokens directly. The output text is fine since it just pastes the token sequence together.
That bug you just found came from David's original preprocessor. You must have very good eyes! Thanks for the report!
https://github.com/ned14/pcpp/blob/26db1a47d132e7ab4a49780dc165f14f6fc767f5/pcpp/preprocessor.py#L128
The
t_CPP_FLOAT
regex has spaces in it. Since spaces are interpreted literally, this never matches a float literal.I only noticed this issue when using the parsed tokens directly. The output text is fine since it just pastes the token sequence together.