Fixed a few typos and bugs in the ObjC++ support.

This commit is contained in:
Roberto Raggi
2009-07-13 12:05:29 +02:00
parent a446e06742
commit 1eefd16383
6 changed files with 12 additions and 6 deletions

View File

@@ -598,7 +598,7 @@ void Lexer::scan_helper(Token *tok)
do {
yyinp();
if (! isalnum(_yychar))
if (! (isalnum(_yychar) || _yychar == '_'))
break;
} while (_yychar);

View File

@@ -56,7 +56,7 @@ static const char *token_names[] = {
("<comment>"), ("<doxy comment>"),
("<identifier>"), ("<int literal>"), ("<float literal>"), ("<char literal>"),
("<identifier>"), ("<numeric literal>"), ("<char literal>"),
("<wide char literal>"), ("<string literal>"), ("<wide char literal>"),
("<@string literal>"), ("<angle string literal>"),

View File

@@ -224,9 +224,9 @@ enum Kind {
T_AT_THROW,
T_AT_TRY,
T_LAST_OBJC_AT_KEYWORD,
T_LAST_OBJC_AT_KEYWORD = T_AT_TRY,
T_FIRST_QT_KEYWORD = T_LAST_OBJC_AT_KEYWORD,
T_FIRST_QT_KEYWORD,
// Qt keywords
T_SIGNAL = T_FIRST_QT_KEYWORD,
@@ -300,7 +300,7 @@ public:
{ return kind == T_COMMENT || kind == T_DOXY_COMMENT; }
inline bool isObjCAtKeyword() const
{ return kind >= T_FIRST_OBJC_AT_KEYWORD && kind < T_LAST_OBJC_AT_KEYWORD; }
{ return kind >= T_FIRST_OBJC_AT_KEYWORD && kind <= T_LAST_OBJC_AT_KEYWORD; }
static const char *name(int kind);