try {
statement = statement();
blockStatements.add(statement);
+ if (token == TokenNameEOF) {
+ return null;
+ }
if (branchStatement && statement != null) {
// reportSyntaxError("Unreachable code", statement.sourceStart,
// statement.sourceEnd);
}
}
// TODO is this ok ?
- return ref;
+ // return ref;
// throwSyntaxError("'(' expected in function call.");
- }
- getNextToken();
- if (token == TokenNameRPAREN) {
+ } else {
getNextToken();
- return ref;
- }
- non_empty_function_call_parameter_list();
- if (token != TokenNameRPAREN) {
- String functionName;
- if (ident == null) {
- functionName = new String(" ");
+
+ if (token == TokenNameRPAREN) {
+ getNextToken();
+ ref = null;
} else {
- functionName = new String(ident);
+ non_empty_function_call_parameter_list();
+ if (token != TokenNameRPAREN) {
+ String functionName;
+ if (ident == null) {
+ functionName = new String(" ");
+ } else {
+ functionName = new String(ident);
+ }
+ throwSyntaxError("')' expected in function call (" + functionName + ").");
+ }
+ getNextToken();
}
- throwSyntaxError("')' expected in function call (" + functionName + ").");
}
- getNextToken();
-
if (token == TokenNameMINUS_GREATER) {
ref = null;
getNextToken();