public override Type GetResultType(IResolver resolver) { Type leftType = left.GetResultType(resolver); IdentifierNode identifierNode = right as IdentifierNode; if (identifierNode != null) { return(resolver.GetMemberType(leftType, identifierNode.Identifier)); } else { FunctionCallNode functionNode = (FunctionCallNode)right; functionNode.DeclaringType = leftType; return(functionNode.GetResultType(resolver)); } }
public override void Validate(IResolver resolver) { left.Validate(resolver); Type leftType = left.GetResultType(resolver); IdentifierNode identifierNode = right as IdentifierNode; if (identifierNode != null) { resolver.GetMemberType(leftType, identifierNode.Identifier); return; } FunctionCallNode functionNode = right as FunctionCallNode; if (functionNode != null) { functionNode.DeclaringType = left.GetResultType(resolver); return; } }