Lexer2
- Migrated ::dequote method from Lexer.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user