- Lexer::Type::identifier now includes DOM references.
This commit is contained in:
Paul Beckingham
2015-03-01 22:08:19 -05:00
parent cefc129e9a
commit 2af470bb90

View File

@@ -951,11 +951,23 @@ bool Lexer::isOperator (std::string& token, Lexer::Type& type)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Lexer::Type::identifier // Lexer::Type::identifier
// <isIdentifierStart> [ <isIdentifierNext> ]* // [ <idDigit>+ . ] <isIdentifierStart> [ <isIdentifierNext> ]*
bool Lexer::isIdentifier (std::string& token, Lexer::Type& type) bool Lexer::isIdentifier (std::string& token, Lexer::Type& type)
{ {
std::size_t marker = _cursor; std::size_t marker = _cursor;
if (isDigit (_text[marker]))
{
++marker;
while (isDigit (_text[marker]))
++marker;
if (_text[marker] == '.')
++marker;
else
return false;
}
if (isIdentifierStart (_text[marker])) if (isIdentifierStart (_text[marker]))
{ {
utf8_next_char (_text, marker); utf8_next_char (_text, marker);