当前位置: 首页>>代码示例>>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;未经允许,请勿转载。