if (Scanner.TRACE) {
System.out.println("TRACE: dynamic_class_name_reference()");
}
- base_variable();
+ base_variable(true);
if (token == TokenNameMINUS_GREATER) {
getNextToken();
object_property();
}
}
}
- // TODO is this ok ?
- 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(" ");
- } else {
- functionName = new String(ident);
+ if (token == TokenNameRPAREN) {
+ getNextToken();
+ return ref;
+ }
+ 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 + ").");
}
- throwSyntaxError("')' expected in function call (" + functionName + ").");
+ getNextToken();
}
- getNextToken();
return ref;
}
return function_call(lefthandside, ignoreVar);
}
- private Expression base_variable() {
+ private Expression base_variable(boolean lefthandside) {
// base_variable:
// reference_variable
// | simple_indirect_reference reference_variable
while (token == TokenNameDOLLAR) {
getNextToken();
}
- reference_variable(false, false);
+ reference_variable(lefthandside, false);
}
return ref;
}