//| static_member '(' function_call_parameter_list ')'
//| variable_without_objects '(' function_call_parameter_list ')'
char[] defineName = null;
+ char[] ident = null;
int startPos=0;
int endPos=0;
if (Scanner.TRACE) {
System.out.println("TRACE: function_call()");
}
if (token == TokenNameIdentifier) {
- defineName = scanner.getCurrentIdentifierSource();
+ ident = scanner.getCurrentIdentifierSource();
+ defineName = ident;
startPos = scanner.getCurrentTokenStartPosition();
endPos = scanner.getCurrentTokenEndPosition();
getNextToken();
}
non_empty_function_call_parameter_list();
if (token != TokenNameRPAREN) {
- throwSyntaxError("')' expected in function call.");
+ String functionName;
+ if (ident==null) {
+ functionName = new String(" ");
+ } else {
+ functionName = new String(ident);
+ }
+ throwSyntaxError("')' expected in function call ("+functionName+").");
}
getNextToken();
}