mirror of
https://github.com/gbdev/rgbds.git
synced 2026-06-14 12:42:11 +00:00
Rename BaseV to ValidBaseV
This commit is contained in:
+3
-3
@@ -39,10 +39,10 @@ bool startsIdentifier(int c);
|
|||||||
bool continuesIdentifier(int c);
|
bool continuesIdentifier(int c);
|
||||||
|
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
inline constexpr bool BaseV = Base > 0 && Base <= 36;
|
inline constexpr bool ValidBaseV = Base > 0 && Base <= 36;
|
||||||
|
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
requires BaseV<Base>
|
requires ValidBaseV<Base>
|
||||||
bool isDigit(int c) {
|
bool isDigit(int c) {
|
||||||
if constexpr (Base <= 10) {
|
if constexpr (Base <= 10) {
|
||||||
return c >= '0' && c < static_cast<int>('0' + Base);
|
return c >= '0' && c < static_cast<int>('0' + Base);
|
||||||
@@ -53,7 +53,7 @@ bool isDigit(int c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
requires BaseV<Base>
|
requires ValidBaseV<Base>
|
||||||
uint8_t parseDigit(int c) {
|
uint8_t parseDigit(int c) {
|
||||||
assume(isDigit<Base>(c));
|
assume(isDigit<Base>(c));
|
||||||
if constexpr (Base <= 10) {
|
if constexpr (Base <= 10) {
|
||||||
|
|||||||
+2
-2
@@ -529,7 +529,7 @@ static void shiftChar();
|
|||||||
static int bumpChar();
|
static int bumpChar();
|
||||||
static int nextChar();
|
static int nextChar();
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
requires BaseV<Base>
|
requires ValidBaseV<Base>
|
||||||
static uint32_t readNumber(int initial, char const *prefix);
|
static uint32_t readNumber(int initial, char const *prefix);
|
||||||
|
|
||||||
static uint32_t readBracketedMacroArgNum() {
|
static uint32_t readBracketedMacroArgNum() {
|
||||||
@@ -1075,7 +1075,7 @@ void lexer_SetGfxDigits(char const digits[4]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
requires BaseV<Base>
|
requires ValidBaseV<Base>
|
||||||
static uint32_t readNumber(int initial, char const *prefix) {
|
static uint32_t readNumber(int initial, char const *prefix) {
|
||||||
auto isSomeDigit = [](int c) {
|
auto isSomeDigit = [](int c) {
|
||||||
if constexpr (Base == 2) {
|
if constexpr (Base == 2) {
|
||||||
|
|||||||
+1
-1
@@ -96,7 +96,7 @@ static std::string readKeyword(int initial) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<uint32_t Base>
|
template<uint32_t Base>
|
||||||
requires BaseV<Base>
|
requires ValidBaseV<Base>
|
||||||
static yy::parser::symbol_type readNumber(int initial, char const *prefix, char const *name) {
|
static yy::parser::symbol_type readNumber(int initial, char const *prefix, char const *name) {
|
||||||
LexerStackEntry &context = lexerStack.back();
|
LexerStackEntry &context = lexerStack.back();
|
||||||
uint32_t number;
|
uint32_t number;
|
||||||
|
|||||||
Reference in New Issue
Block a user