Lexer: Migrated isalpha to Lexer::isAlpha
This commit is contained in:
@@ -198,6 +198,13 @@ bool Lexer::isWhitespace (int c)
|
||||
c == 0x3000); // ideographic space Common Separator, space
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Lexer::isAlpha (int c)
|
||||
{
|
||||
return (c >= 'A' && c <= 'Z') ||
|
||||
(c >= 'a' && c <= 'z');
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Digits 0-9.
|
||||
bool Lexer::isDigit (int c)
|
||||
@@ -279,7 +286,7 @@ bool Lexer::isBoundary (int left, int right)
|
||||
if (right == '\0') return true;
|
||||
|
||||
// XOR
|
||||
if (isalpha (left) != isalpha (right)) return true;
|
||||
if (isAlpha (left) != isAlpha (right)) return true;
|
||||
if (isDigit (left) != isDigit (right)) return true;
|
||||
if (isWhitespace (left) != isWhitespace (right)) return true;
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ public:
|
||||
// Static helpers.
|
||||
static const std::string typeName (const Lexer::Type&);
|
||||
static bool isWhitespace (int);
|
||||
static bool isAlpha (int);
|
||||
static bool isDigit (int);
|
||||
static bool isHexDigit (int);
|
||||
static bool isIdentifierStart (int);
|
||||
|
||||
Reference in New Issue
Block a user