本文整理汇总了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;
}
示例2: Find
public SymbolInfo Find(Scope scope, string Name, Scope FromScope)
{
return FindAll(scope, Name, false, false, FromScope);
}
示例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;
}
示例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;
}
示例5: IsInOneModule
private bool IsInOneModule(Scope Scope1, Scope Scope2)
{
Scope1 = FindUnitInterfaceScope(Scope1);
Scope2 = FindUnitInterfaceScope(Scope2);
return (Scope1 != null) && (Scope2 != null) && (Scope1.ScopeNum == Scope2.ScopeNum);
}
示例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;
}
示例7: CreateClassScope
public ClassScope CreateClassScope(Scope TopScope,Scope BaseClass)
{
return new ClassScope(this, TopScope, BaseClass);
}
示例8: CreateInterfaceScope
public InterfaceScope CreateInterfaceScope(Scope TopScope, Scope BaseClass, Scope[] TopInterfaces)
{
return new InterfaceScope(this, TopScope, BaseClass, TopInterfaces);
}
示例9: CreateLambdaScope
public LambdaScope CreateLambdaScope(Scope TopScope) //lroman//
{
return new LambdaScope(this, TopScope);
}
示例10: CreateScope
public Scope CreateScope(Scope TopScope)
{
return new Scope(this,TopScope);
}
示例11: ClassMethodScope
public ClassMethodScope(DSSymbolTable vSymbolTable,Scope TopScope,Scope MyClass):
base(vSymbolTable,TopScope)
{
MyClassNum=-2;
if (MyClass!=null)
MyClassNum=MyClass.ScopeNum;
}
示例12: InterfaceScope
public InterfaceScope(DSSymbolTable vSymbolTable, Scope TopScope, Scope BaseClassScope, Scope[] vTopInterfaceScopeArray)
:
base(vSymbolTable, TopScope, BaseClassScope)
{
_TopInterfaceScopeArray = vTopInterfaceScopeArray;
}
示例13: FindUnitInterfaceScope
private Scope FindUnitInterfaceScope(Scope scope)
{
while (scope!=null && !(scope is UnitInterfaceScope))
scope = scope.TopScope;
return scope;
}
示例14: CreateUnitInterfaceScope
//\ssyy
public UnitInterfaceScope CreateUnitInterfaceScope(Scope[] UsedUnits)
{
return new UnitInterfaceScope(this,null,UsedUnits);
}
示例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;
}