forked from qt-creator/qt-creator
Accepts `$' as valid character when recognizing identifiers.
Added support for yet another gcc extension that is using in OSX 10.6 system headers.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user