Rename BaseV to ValidBaseV

This commit is contained in:
Rangi
2026-06-09 17:55:35 -04:00
parent 6b2b6e6000
commit 0b91bf654b
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -39,10 +39,10 @@ bool startsIdentifier(int c);
bool continuesIdentifier(int c);
template<uint32_t Base>
inline constexpr bool BaseV = Base > 0 && Base <= 36;
inline constexpr bool ValidBaseV = Base > 0 && Base <= 36;
template<uint32_t Base>
requires BaseV<Base>
requires ValidBaseV<Base>
bool isDigit(int c) {
if constexpr (Base <= 10) {
return c >= '0' && c < static_cast<int>('0' + Base);
@@ -53,7 +53,7 @@ bool isDigit(int c) {
}
template<uint32_t Base>
requires BaseV<Base>
requires ValidBaseV<Base>
uint8_t parseDigit(int c) {
assume(isDigit<Base>(c));
if constexpr (Base <= 10) {
+2 -2
View File
@@ -529,7 +529,7 @@ static void shiftChar();
static int bumpChar();
static int nextChar();
template<uint32_t Base>
requires BaseV<Base>
requires ValidBaseV<Base>
static uint32_t readNumber(int initial, char const *prefix);
static uint32_t readBracketedMacroArgNum() {
@@ -1075,7 +1075,7 @@ void lexer_SetGfxDigits(char const digits[4]) {
}
template<uint32_t Base>
requires BaseV<Base>
requires ValidBaseV<Base>
static uint32_t readNumber(int initial, char const *prefix) {
auto isSomeDigit = [](int c) {
if constexpr (Base == 2) {
+1 -1
View File
@@ -96,7 +96,7 @@ static std::string readKeyword(int initial) {
}
template<uint32_t Base>
requires BaseV<Base>
requires ValidBaseV<Base>
static yy::parser::symbol_type readNumber(int initial, char const *prefix, char const *name) {
LexerStackEntry &context = lexerStack.back();
uint32_t number;