- Migrated ::dequote method from Lexer.
This commit is contained in:
Paul Beckingham
2015-02-19 21:43:22 -08:00
parent be80bc4ea3
commit aab93b2cda
4 changed files with 43 additions and 29 deletions

View File

@@ -237,6 +237,18 @@ bool Lexer2::isPunctuation (int c)
ispunct (c);
}
////////////////////////////////////////////////////////////////////////////////
void Lexer2::dequote (std::string& input)
{
int quote = input[0];
size_t len = input.length ();
if ((quote == '\'' || quote == '"') &&
quote == input[len - 1])
{
input = input.substr (1, len - 2);
}
}
////////////////////////////////////////////////////////////////////////////////
bool Lexer2::isEOS () const
{