Commit 4a87d875 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Accepts `$' as valid character when recognizing identifiers.

Added support for yet another gcc extension that is using in OSX 10.6 system headers.
parent 093a309d
......@@ -603,7 +603,7 @@ void Lexer::scan_helper(Token *tok)
do {
yyinp();
if (! (isalnum(_yychar) || _yychar == '_'))
if (! (isalnum(_yychar) || _yychar == '_' || _yychar == '$'))
break;
} while (_yychar);
......@@ -674,9 +674,9 @@ void Lexer::scan_helper(Token *tok)
if (control())
tok->string = control()->findOrInsertStringLiteral(yytext, yylen);
} else if (std::isalpha(ch) || ch == '_') {
} else if (std::isalpha(ch) || ch == '_' || ch == '$') {
const char *yytext = _currentChar - 1;
while (std::isalnum(_yychar) || _yychar == '_')
while (std::isalnum(_yychar) || _yychar == '_' || _yychar == '$')
yyinp();
int yylen = _currentChar - yytext;
if (f._scanKeywords)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment