Merge branch 'master' into java10-basic-support

This commit is contained in:
Andreas Dangel
2018-05-21 10:07:05 +02:00
101 changed files with 1860 additions and 580 deletions

View File

@ -378,11 +378,11 @@ public class JavaParser {
// Note that this can't be replaced with a syntactic lookahead
// since "assert" isn't a string literal token
private boolean isNextTokenAnAssert() {
boolean res = getToken(1).image.equals("assert");
if (res && jdkVersion <= 3 && getToken(2).image.equals("(")) {
res = false;
if (jdkVersion <= 3) {
return false;
}
return res;
return getToken(1).image.equals("assert");
}
private boolean isPrecededByComment(Token tok) {
@ -2385,7 +2385,6 @@ void IfStatement() :
{}
{
"if" "(" Expression() ")" Statement() [ LOOKAHEAD(1) "else" {jjtThis.setHasElse();} Statement() ]
{}
}
void WhileStatement() :