Skip to content

Commit

Permalink
Merge pull request boostorg#109 from jefftrull/feature/cpp20-tokens
Browse files Browse the repository at this point in the history
Introduce C++20 tokens
  • Loading branch information
jefftrull authored Aug 16, 2020
2 parents 7c92c31 + 200f91e commit 465fe22
Show file tree
Hide file tree
Showing 16 changed files with 5,947 additions and 5,083 deletions.
8 changes: 8 additions & 0 deletions include/boost/wave/cpplexer/re2clex/cpp.re
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,20 @@ NonDigit = [a-zA-Z_$] | UniversalChar;
"case" { BOOST_WAVE_RET(T_CASE); }
"catch" { BOOST_WAVE_RET(T_CATCH); }
"char" { BOOST_WAVE_RET(T_CHAR); }
"char8_t" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CHAR8_T : T_IDENTIFIER); }
"char16_t" { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CHAR16_T : T_IDENTIFIER); }
"char32_t" { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CHAR32_T : T_IDENTIFIER); }
"class" { BOOST_WAVE_RET(T_CLASS); }
"concept" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CONCEPT : T_IDENTIFIER); }
"const" { BOOST_WAVE_RET(T_CONST); }
"consteval" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CONSTEVAL : T_IDENTIFIER); }
"constexpr" { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_CONSTEXPR : T_IDENTIFIER); }
"constinit" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CONSTINIT : T_IDENTIFIER); }
"const_cast" { BOOST_WAVE_RET(T_CONSTCAST); }
"continue" { BOOST_WAVE_RET(T_CONTINUE); }
"co_await" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CO_AWAIT : T_IDENTIFIER); }
"co_return" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CO_RETURN : T_IDENTIFIER); }
"co_yield" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_CO_YIELD : T_IDENTIFIER); }
"decltype" { BOOST_WAVE_RET(s->act_in_cpp0x_mode ? T_DECLTYPE : T_IDENTIFIER); }
"default" { BOOST_WAVE_RET(T_DEFAULT); }
"delete" { BOOST_WAVE_RET(T_DELETE); }
Expand Down Expand Up @@ -93,6 +100,7 @@ NonDigit = [a-zA-Z_$] | UniversalChar;
"public" { BOOST_WAVE_RET(T_PUBLIC); }
"register" { BOOST_WAVE_RET(T_REGISTER); }
"reinterpret_cast" { BOOST_WAVE_RET(T_REINTERPRETCAST); }
"requires" { BOOST_WAVE_RET(s->act_in_cpp2a_mode ? T_REQUIRES : T_IDENTIFIER); }
"return" { BOOST_WAVE_RET(T_RETURN); }
"short" { BOOST_WAVE_RET(T_SHORT); }
"signed" { BOOST_WAVE_RET(T_SIGNED); }
Expand Down
Loading

0 comments on commit 465fe22

Please sign in to comment.