public void initializeScanner() {
this.scanner = new Scanner(false /* comment */, false /* whitespace */, this.options
.getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore /* nls */, false, false,
- this.options.taskTags/* taskTags */, this.options.taskPriorites/* taskPriorities */);
+ this.options.taskTags/* taskTags */,
+ this.options.taskPriorites/* taskPriorities */,
+ true/*isTaskCaseSensitive*/);
}
/**
throw new SyntaxError(1, 0, " ", error);
}
+ private void reportSyntaxError(String error) {
+ int problemStartPosition = scanner.getCurrentTokenStartPosition();
+ int problemEndPosition = scanner.getCurrentTokenEndPosition();
+ reportSyntaxError(error, problemStartPosition, problemEndPosition + 1);
+ }
+
private void reportSyntaxError(String error, int problemStartPosition, int problemEndPosition) {
problemReporter.phpParsingError(new String[] { error }, problemStartPosition, problemEndPosition, referenceContext,
compilationUnit.compilationResult);
}
} else { // TokenNamedefault
getNextToken();
- if (token == TokenNameCOLON) {
+ if (token == TokenNameCOLON || token == TokenNameSEMICOLON) {
getNextToken();
if (token == TokenNameRBRACE) {
// empty default case