// }
}
} catch (IndexOutOfBoundsException e) {
+// reset end position for error reporting
+ currentPosition-=2;
throw new InvalidInputException(UNTERMINATED_STRING);
} catch (InvalidInputException e) {
if (e.getMessage().equals(INVALID_ESCAPE)) {
// }
}
} catch (IndexOutOfBoundsException e) {
+ // reset end position for error reporting
+ currentPosition-=2;
throw new InvalidInputException(UNTERMINATED_STRING);
} catch (InvalidInputException e) {
if (e.getMessage().equals(INVALID_ESCAPE)) {
// }
}
} catch (IndexOutOfBoundsException e) {
+// reset end position for error reporting
+ currentPosition-=2;
throw new InvalidInputException(UNTERMINATED_STRING);
} catch (InvalidInputException e) {
if (e.getMessage().equals(INVALID_ESCAPE)) {
return TokenNameCOMMENT_BLOCK;
}
} catch (IndexOutOfBoundsException e) {
+// reset end position for error reporting
+ currentPosition-=2;
throw new InvalidInputException(UNTERMINATED_COMMENT);
}
break;
public char[] getSource() {
return this.source;
}
+ public static boolean isIdentifierOrKeyword(int token) {
+ return (token == TokenNameIdentifier) || (token > TokenNameKEYWORD);
+ }
final char[] optimizedCurrentTokenSource1() {
//return always the same char[] build only once
//optimization at no speed cost of 99.5 % of the singleCharIdentifier