diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-04 13:45:49 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-04 13:45:49 +0100 |
commit | 4a87d875f04239595e9fe3904f0461ebbfdf227f (patch) | |
tree | 337ec8e171d1055b5ef6e0cd61ff5b066aacded5 /src/shared/cplusplus/Lexer.cpp | |
parent | 093a309dab94ba9bf9f1f23a9b61480f3dc59aa1 (diff) | |
download | qt-creator-4a87d875f04239595e9fe3904f0461ebbfdf227f.tar.gz |
Accepts `$' as valid character when recognizing identifiers.
Added support for yet another gcc extension that is using in OSX 10.6 system headers.
Diffstat (limited to 'src/shared/cplusplus/Lexer.cpp')
-rw-r--r-- | src/shared/cplusplus/Lexer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/cplusplus/Lexer.cpp b/src/shared/cplusplus/Lexer.cpp index a0cc9495d8..f8f1b6f133 100644 --- a/src/shared/cplusplus/Lexer.cpp +++ b/src/shared/cplusplus/Lexer.cpp @@ -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) |