Ejemplo n.º 1
0
		public static AbstractType DemangleAndResolve(string mangledString, ResolutionContext ctxt, out ITypeDeclaration qualifier)
		{
			bool isCFunction;
			Demangler.Demangle(mangledString, ctxt, out qualifier, out isCFunction);
			
			// Seek for C functions | Functions that have no direct module association (e.g. _Dmain)
			if(qualifier is IdentifierDeclaration && qualifier.InnerDeclaration == null)
			{
				var id = (qualifier as IdentifierDeclaration).Id;
				return Resolver.ASTScanner.NameScan.ScanForCFunction(ctxt, id, isCFunction);
			}
			
			bool seekCtor = false;
			if(qualifier is IdentifierDeclaration)
			{
				var id = (qualifier as IdentifierDeclaration).Id;
				if((seekCtor = (id == DMethod.ConstructorIdentifier)) || id == "__Class" || id =="__ModuleInfo")
					qualifier = qualifier.InnerDeclaration;
			}

			var resSym = TypeDeclarationResolver.ResolveSingle(qualifier,ctxt);
			
			if(seekCtor && resSym is UserDefinedType)
			{
				var ctor = (resSym as TemplateIntermediateType).Definition[DMethod.ConstructorIdentifier].FirstOrDefault();
				if(ctor!= null)
					resSym = new MemberSymbol(ctor as DNode, null, null);
			}
			return resSym;
		}
Ejemplo n.º 2
0
 public void VisitMemberSymbol(MemberSymbol t)
 {
     VisitDSymbol(t);
 }
Ejemplo n.º 3
0
        public void VisitMemberSymbol(MemberSymbol mrr)
        {
            if (mrr.Base != null)
            {
                isVariableInstance |= (mrr.Definition is DVariable && !(mrr is AliasedType) || // True if we obviously have a variable handled here. Otherwise depends on the samely-named parameter..
                        mrr.Definition is DMethod);

                mrr.Base.Accept(this);
            }
            else
                GenUfcsAndStaticProperties(mrr);
        }
 void BuildCompletionData(MemberSymbol mrr, IBlockNode currentlyScopedBlock, bool isVariableInstance = false)
 {
     if (mrr.Base != null)
             BuildCompletionData(mrr.Base,
                 currentlyScopedBlock,
                 mrr is AliasedType ? isVariableInstance : true, // True if we obviously have a variable handled here. Otherwise depends on the samely-named parameter..
                 mrr);
     else
         StaticTypePropertyProvider.AddGenericProperties(mrr, CompletionDataGenerator, mrr.Definition, false);
 }
Ejemplo n.º 5
0
		public void VisitMemberSymbol(MemberSymbol t)
		{
			VisitDSymbol(t);
		}
		public void VisitMemberSymbol(MemberSymbol mrr)
		{
			if (mrr.Base != null)
				mrr.Base.Accept(this);
			else
				GenUfcsAndStaticProperties(mrr);
		}
Ejemplo n.º 7
0
 void BuildCompletionData(MemberSymbol mrr, IBlockNode currentlyScopedBlock, bool isVariableInstance = false)
 {
     if (mrr.Base != null)
             BuildCompletionData(mrr.Base,
                 currentlyScopedBlock,
                 isVariableInstance ||
                 (mrr.Definition is DVariable && !(mrr is AliasedType) || // True if we obviously have a variable handled here. Otherwise depends on the samely-named parameter..
                 mrr.Definition is DMethod),
                 mrr);
     else
         StaticProperties.ListProperties(CompletionDataGenerator, MemberFilter, mrr, false);
 }
Ejemplo n.º 8
0
 public ITypeDeclaration VisitMemberSymbol(MemberSymbol t)
 {
     return(VisitDSymbol(t));
 }