Fix JavaStyle warnings and awkward formatting in Scanner
@@ -138,12 +138,10 @@ public class Scanner {
public LiteralToken nextTemplateLiteralToken() {
Token token = nextToken();
if (isAtEnd() || token.type != TokenType.CLOSE_CURLY) {
- reportError(getPosition(index),
- "Expected '}' after expression in template literal");
+ reportError(getPosition(index), "Expected '}' after expression in template literal");
}
- return nextTemplateLiteralTokenShared(
- TokenType.TEMPLATE_TAIL, TokenType.TEMPLATE_MIDDLE);
+ return nextTemplateLiteralTokenShared(TokenType.TEMPLATE_TAIL, TokenType.TEMPLATE_MIDDLE);
}
private boolean skipRegularExpressionBody() {
@@ -315,6 +313,7 @@ public class Scanner {
case '*':
skipMultiLineComment();
return true;
+ default: // fall out
}
break;
case '<':
@@ -342,6 +341,7 @@ public class Scanner {
return true;
}
break;
+ default: // fall out
}
}
return false;
@@ -988,6 +988,7 @@ public class Scanner {
case '-':
nextChar();
break;
+ default: // fall out
}
if (!isDecimalDigit(peekChar())) {
reportError("Exponent part must contain at least one digit");
