return new TypeNode(type);
}
case Type.METHOD:
{
MethodType method = (MethodType)type;
ClassStatement context = _statement.getClassStatement();
if (type instanceof FunctionStatement) {
FunctionStatement function = (FunctionStatement)type;
if (function.getContext() != null) {
if (hasArgs()) {
return new InlinedCallNode(_statement.getFunctionStatement(), function, consumeArgs());
} else {
return new InlinedFunctionNode(_statement.getFunctionStatement(), function);
}
}
}
if (hasMoreSymbols()) {
return new TypeNode(type);
} else {
Grammar.checkInstanceAmbiguity(listener, _location, context, method);
if (hasArgs()) {
//methodname(...)
checkArguments(listener, method);
return new StaticInvokeNode(method.getClassType(), context, method, consumeArgs());
} else {
//methodname
return new DelegateNode(new ThisNode(context, method.getClassType()), method);
}
}
}
case Type.CONSTRUCTOR: