當前位置: 首頁>>代碼示例>>C#>>正文


C# SymbolTable.Scope類代碼示例

本文整理匯總了C#中SymbolTable.Scope的典型用法代碼示例。如果您正苦於以下問題:C# Scope類的具體用法?C# Scope怎麽用?C# Scope使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Scope類屬於SymbolTable命名空間,在下文中一共展示了Scope類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: FindOnlyInType

 public override SymbolInfo FindOnlyInType(string name, Scope CurrentScope)
 {
     SymbolInfo si = SymbolTable.FindOnlyInType(this, name, CurrentScope);
     if (PartialScope != null)
     {
         if (si == null)
             si = SymbolTable.FindOnlyInType(PartialScope, name, CurrentScope);
         else
         {
             SymbolInfo tmp_si = si;
             while (tmp_si.Next != null)
                 tmp_si = tmp_si.Next;
             tmp_si.Next = SymbolTable.FindOnlyInType(PartialScope, name, CurrentScope);
         }
     }
     if (si == null) return si;
     PascalABCCompiler.TreeRealization.BasePCUReader.RestoreSymbols(si, name);
     return si;
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:19,代碼來源:SymbolTable.cs

示例2: Find

 public SymbolInfo Find(Scope scope, string Name, Scope FromScope)
 {
     return FindAll(scope, Name, false, false, FromScope);
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:4,代碼來源:SymbolTable.cs

示例3: AddToSymbolInfo

		private SymbolInfo AddToSymbolInfo(SymbolInfo to,SymbolInfo si,Scope scope)
		{
			if(si!=null)
				if(IsNormal(to,si))	
				{
					to.Next=si;si.Next=null;
					LastScope=scope;
					return si;
				}
			LastScope=scope;
			return to;	
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:12,代碼來源:SymbolTable.cs

示例4: FindAllInAreaList

		private SymbolInfo FindAllInAreaList(SymbolInfo si,string name,Scope[] arr,AreaNodesList AreaNodes, bool StopIfFind, SymbolInfo FirstInfo)
		{
			if (arr==null) return si;
			int p;
            SymbolInfo sib=si;
            HashSet<Assembly> assm_cache = new HashSet<Assembly>();
			foreach(Scope sc in arr)
			{
                if (sc is DotNETScope)
                {
                    if (sc is PascalABCCompiler.NetHelper.NetScope)
                    {
                        PascalABCCompiler.NetHelper.NetScope netScope = sc as PascalABCCompiler.NetHelper.NetScope;
                        if (PascalABCCompiler.NetHelper.NetHelper.PABCSystemType == null || netScope.Assembly != PascalABCCompiler.NetHelper.NetHelper.PABCSystemType.Assembly)
                        {
                            if (!assm_cache.Contains(netScope.Assembly))
                                assm_cache.Add(netScope.Assembly);
                            else if (netScope.used_namespaces.Count == 0)
                                continue;
                        }
                    }
                    si = AddToSymbolInfo(si, (DotNETScope)sc, name);
                    if (sib.Next != null && StopIfFind)
                        return si;
                }
                else
                if (AreaNodes != null && sc != null)
                {
                    p = AreaNodes.IndexOf(sc.ScopeNum);
                    if (p >= 0)
                    {
                        si = AddToSymbolInfo(si, AreaNodes[p].InfoList, sc, FirstInfo);
                        if (sib.Next != null && StopIfFind)
                            return si;
                    }
                }
			}
			return si;
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:39,代碼來源:SymbolTable.cs

示例5: IsInOneModule

 private bool IsInOneModule(Scope Scope1, Scope Scope2)
 {
     Scope1 = FindUnitInterfaceScope(Scope1);
     Scope2 = FindUnitInterfaceScope(Scope2);
     return (Scope1 != null) && (Scope2 != null) && (Scope1.ScopeNum == Scope2.ScopeNum);
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:6,代碼來源:SymbolTable.cs

示例6: IsVisible

 private bool IsVisible(SymbolInfo ident, Scope fromScope)
 {
     if (fromScope == null) 
         return true;
     if (FindClassScope(ident.scope) == null)
         return true;
     switch (ident.access_level)
     {
         case access_level.al_public:
         case access_level.al_internal:
             return true;
         case access_level.al_protected:
             return IsInOneModule(ident.scope, fromScope) || IsInOneOrDerivedClass(ident.scope, fromScope);
         case access_level.al_private:
             return IsInOneModule(ident.scope, fromScope);
     }
     return true;
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:18,代碼來源:SymbolTable.cs

示例7: CreateClassScope

		public ClassScope CreateClassScope(Scope TopScope,Scope BaseClass)
		{
            return new ClassScope(this, TopScope, BaseClass);	
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:4,代碼來源:SymbolTable.cs

示例8: CreateInterfaceScope

 public InterfaceScope CreateInterfaceScope(Scope TopScope, Scope BaseClass, Scope[] TopInterfaces)
 {
     return new InterfaceScope(this, TopScope, BaseClass, TopInterfaces);
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:4,代碼來源:SymbolTable.cs

示例9: CreateLambdaScope

		public LambdaScope CreateLambdaScope(Scope TopScope) //lroman//
        {
            return new LambdaScope(this, TopScope);
        }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:4,代碼來源:SymbolTable.cs

示例10: CreateScope

		public Scope CreateScope(Scope TopScope)
		{
			return new Scope(this,TopScope);
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:4,代碼來源:SymbolTable.cs

示例11: ClassMethodScope

		public ClassMethodScope(DSSymbolTable vSymbolTable,Scope TopScope,Scope MyClass):
			base(vSymbolTable,TopScope)
		{
			MyClassNum=-2;
			if (MyClass!=null) 
				MyClassNum=MyClass.ScopeNum;
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:7,代碼來源:SymbolTable.cs

示例12: InterfaceScope

 public InterfaceScope(DSSymbolTable vSymbolTable, Scope TopScope, Scope BaseClassScope, Scope[] vTopInterfaceScopeArray)
     :
     base(vSymbolTable, TopScope, BaseClassScope)
 {
     _TopInterfaceScopeArray = vTopInterfaceScopeArray;
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:6,代碼來源:SymbolTable.cs

示例13: FindUnitInterfaceScope

 private Scope FindUnitInterfaceScope(Scope scope)
 {
     while (scope!=null && !(scope is UnitInterfaceScope))
         scope = scope.TopScope;
     return scope;
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:6,代碼來源:SymbolTable.cs

示例14: CreateUnitInterfaceScope

        //\ssyy
        public UnitInterfaceScope CreateUnitInterfaceScope(Scope[] UsedUnits)
		{
			return new UnitInterfaceScope(this,null,UsedUnits);
		}
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:5,代碼來源:SymbolTable.cs

示例15: FindClassScope

 private Scope FindClassScope(Scope scope)
 {
     while (scope != null && !(scope is ClassScope))
         if(scope is ClassMethodScope)
             scope = ((ClassMethodScope)scope).MyClass;
         else
             scope = scope.TopScope;
     return scope;
 }
開發者ID:Slav76,項目名稱:pascalabcnet,代碼行數:9,代碼來源:SymbolTable.cs


注:本文中的SymbolTable.Scope類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。