public ConstantInfo(IPythonConstant value, PythonAnalyzer projectState) : base((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type)) { _value = value; _memberType = value.MemberType; _builtinInfo = ((BuiltinClassInfo)projectState.GetAnalysisValueFromObjects(value.Type)).Instance; }
public static string GetString(this IPythonConstant c) { switch (c.Value) { case string s: return(s); case AsciiString ascii: return(ascii.String); default: return(null); } }
internal ISet <Namespace> GetConstant(IPythonConstant value) { object key = value ?? _nullKey; return(GetCached <ISet <Namespace> >(key, () => new ConstantInfo(value, this).SelfSet)); }
internal IAnalysisSet GetConstant(IPythonConstant value) { object key = value ?? _nullKey; return(GetCached(key, () => new ConstantInfo(value, this)) ?? _noneInst); }
internal IAnalysisSet GetConstant(IPythonConstant value) { object key = value ?? _nullKey; return(GetCached(key, () => ConstantInfo.Create(this, value) ?? _noneInst) ?? _noneInst); }
public ValueView(IModuleContext context, string name, IPythonConstant member) : base(context, name, member) { _value = member; }