boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

Let expanded long integer literals participate in conditional expressions #165

Closed jefftrull closed 2 years ago

jefftrull commented 2 years ago

It seems that the grammar for conditional preprocessor expressions was not updated when long integer literals were added for C++11. This seems to work most of the time, as they get recognized as PP_NUMBER tokens, which are in the grammar. Sometimes, though, when they are produced as part of a macro expansion, they can appear as LONGINTLIT tokens, which are not in the grammar. Wave then rejects the expression as invalid.

These changes add LONGINTLIT tokens as valid numbers in expressions, and in doing so resolve #162