public override IAnalysisSet GetDescriptor(Node node, AnalysisValue instance, AnalysisValue context, AnalysisUnit unit)
        {
            if (_function.IsStatic || instance.IsOfType(ProjectState.ClassInfos[BuiltinTypeId.NoneType]))
            {
                return(base.GetDescriptor(node, instance, context, unit));
            }
            else if (_method == null)
            {
                _method = new BuiltinMethodInfo(_function, PythonMemberType.Method, ProjectState);
            }

            return(_method.GetDescriptor(node, instance, context, unit));
        }
Exemplo n.º 2
0
        public override ISet <Namespace> GetDescriptor(Namespace instance, Interpreter.AnalysisUnit unit)
        {
            if (_function.IsStatic)
            {
                return(base.GetDescriptor(instance, unit));
            }
            else if (_method == null)
            {
                _method = new BuiltinMethodInfo(_function, PythonMemberType.Method, ProjectState);
            }

            return(_method.GetDescriptor(instance, unit));
        }
Exemplo n.º 3
0
 public BoundBuiltinMethodInfo(BuiltinMethodInfo method)
 {
     _method = method;
 }
 public ListPopBoundBuiltinMethodInfo(ListInfo list, BuiltinMethodInfo method)
     : base(method)
 {
     _list = list;
 }
Exemplo n.º 5
0
 public BoundBuiltinMethodInfo(BuiltinMethodInfo method)
     : base(method.PythonType, method.ProjectState)
 {
     Method = method;
 }
Exemplo n.º 6
0
 public GeneratorNextBoundBuiltinMethodInfo(GeneratorInfo generator, BuiltinMethodInfo method)
     : base(method)
 {
     _generator = generator;
 }