CLI2: Expand DOM references in single-token values

This commit is contained in:
Paul Beckingham 2015-09-07 11:49:55 -04:00
parent 557a8d357c
commit e4132f6a02
4 changed files with 25 additions and 1 deletions

View file

@ -1323,6 +1323,20 @@ bool Lexer::isAllDigits (const std::string& text)
return text.find_first_not_of ("0123456789") == std::string::npos;
}
////////////////////////////////////////////////////////////////////////////////
bool Lexer::isDOM (const std::string& text)
{
Lexer lex (text);
int count = 0;
std::string token;
Lexer::Type type;
while (lex.token (token, type))
++count;
return count == 1 &&
type == Lexer::Type::dom;
}
////////////////////////////////////////////////////////////////////////////////
// Full implementation of a quoted word. Includes:
// '\''