Lexer: Added ::wasQuoted to determine original quote state
This commit is contained in:
@@ -324,6 +324,15 @@ void Lexer::dequote (std::string& input)
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Lexer::wasQuoted (const std::string& input)
|
||||
{
|
||||
if (input.find_first_of (" \t()") != std::string::npos)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Lexer::isEOS () const
|
||||
{
|
||||
|
||||
25
src/Lexer.h
25
src/Lexer.h
@@ -63,18 +63,19 @@ 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);
|
||||
static bool isIdentifierNext (int);
|
||||
static bool isSingleCharOperator (int);
|
||||
static bool isDoubleCharOperator (int, int, int);
|
||||
static bool isTripleCharOperator (int, int, int, int);
|
||||
static bool isBoundary (int, int);
|
||||
static bool isPunctuation (int);
|
||||
static void dequote (std::string&);
|
||||
static bool isWhitespace (int);
|
||||
static bool isAlpha (int);
|
||||
static bool isDigit (int);
|
||||
static bool isHexDigit (int);
|
||||
static bool isIdentifierStart (int);
|
||||
static bool isIdentifierNext (int);
|
||||
static bool isSingleCharOperator (int);
|
||||
static bool isDoubleCharOperator (int, int, int);
|
||||
static bool isTripleCharOperator (int, int, int, int);
|
||||
static bool isBoundary (int, int);
|
||||
static bool isPunctuation (int);
|
||||
static void dequote (std::string&);
|
||||
static bool wasQuoted (const std::string&);
|
||||
|
||||
// Helpers.
|
||||
bool isEOS () const;
|
||||
|
||||
Reference in New Issue
Block a user