本文整理匯總了C#中AST.ResolveMemberDecls方法的典型用法代碼示例。如果您正苦於以下問題:C# AST.ResolveMemberDecls方法的具體用法?C# AST.ResolveMemberDecls怎麽用?C# AST.ResolveMemberDecls使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類AST
的用法示例。
在下文中一共展示了AST.ResolveMemberDecls方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: DoCheck
//-----------------------------------------------------------------------------
// Main checking routine
// Return true if successful, else false
//-----------------------------------------------------------------------------
public bool DoCheck(
AST.ProgramDecl p,
ICLRtypeProvider provider,
Assembly [] refs
)
{
Debug.Assert(provider != null);
Debug.Assert(p != null);
m_provider = provider;
string stSubPhase = "";
try
{
m_scopeGlobal = new Scope("Global", null, null);
// Import symbols
stSubPhase = "importing assemblies";
ImportAssembly(GetMscorlib());
AddDefaultTypes(m_scopeGlobal);
foreach(Assembly a in refs)
{
ImportAssembly(a);
}
// Pass 1 - Resolve the namespaces and stub the types.
// This will stub all scopes and create a lexical-scope tree.
stSubPhase = "resolving namespaces";
p.ResolveNamespace(this, m_scopeGlobal);
// Pass 2 - Resolve Types (to both CLR & Blue)
stSubPhase = "resolving to clr types";
p.ResolveTypes(this, provider);
// Pass 3 - resolve class member declarations (Methods & fields)
stSubPhase = "resolving member declarations";
p.ResolveMemberDecls(this, provider);
// Pass 4 - resolve method bodies
stSubPhase = "resolving member bodies";
p.ResolveBodies(this);
// Final Debug verify before codegen
stSubPhase = "final debug check";
p.DebugCheck(this);
m_scopeGlobal.DebugCheck(this);
p.NotifyResolutionDone();
return true;
}
// Strip away SymbolErrors; we've already reported them when we first threw them.
catch (SymbolError.SymbolErrorException)
{
return false;
}
catch(System.Exception e)
{
Blue.Driver.PrintError_InternalError(e, "Symbol Resolution(" + stSubPhase + ")");
return false;
}
}