Skip to content

Commit ac31d13

Browse files
committed
Implement support for digit separators in preprocessor expressions
Integers with digit separators are already recognized as literal tokens. This commit adds proper interpretation of them as integers for use in expressions e.g. with #if
1 parent 7a8e9d3 commit ac31d13

File tree

6 files changed

+903
-785
lines changed

6 files changed

+903
-785
lines changed

include/boost/wave/cpplexer/re2clex/cpp.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ pp_number:
468468
469469
if (s->detect_pp_numbers) {
470470
/*!re2c
471-
"."? Digit (Digit | NonDigit | ExponentStart | ".")*
471+
"."? Digit (("'"? (Digit | NonDigit | ExponentStart)) | ".")*
472472
{ BOOST_WAVE_RET(T_PP_NUMBER); }
473473
474474
// because we reached this point, then reset the cursor,

0 commit comments

Comments
 (0)