summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/lupdate/java.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/linguist/lupdate/java.cpp b/tools/linguist/lupdate/java.cpp
index c8dbe5b..31024f9 100644
--- a/tools/linguist/lupdate/java.cpp
+++ b/tools/linguist/lupdate/java.cpp
@@ -60,7 +60,7 @@ enum { Tok_Eof, Tok_class, Tok_return, Tok_tr,
Tok_Comment, Tok_String, Tok_Colon, Tok_Dot,
Tok_LeftBrace, Tok_RightBrace, Tok_LeftParen,
Tok_RightParen, Tok_Comma, Tok_Semicolon,
- Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq };
+ Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq, Tok_null };
class Scope
{
@@ -144,7 +144,11 @@ static int getToken()
case 'c':
if ( yyIdent == QLatin1String("class") )
return Tok_class;
- break;
+ break;
+ case 'n':
+ if ( yyIdent == QLatin1String("null") )
+ return Tok_null;
+ break;
}
}
switch ( yyIdent.at(0).toLatin1() ) {
@@ -384,9 +388,11 @@ static bool matchInteger( qlonglong *number)
static bool matchStringOrNull(QString &s)
{
bool matches = matchString(s);
- qlonglong num = 0;
- if (!matches) matches = matchInteger(&num);
- return matches && num == 0;
+ if (!matches) {
+ matches = (yyTok == Tok_null);
+ if (matches) yyTok = getToken();
+ }
+ return matches;
}
/*