Lexer: Added ::wasQuoted to determine original quote state

This commit is contained in:
Paul Beckingham
2015-06-28 12:35:06 -04:00
parent ba65fa67b1
commit 86ed232348
3 changed files with 30 additions and 14 deletions

View File

@@ -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
{

View File

@@ -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;