本文整理汇总了C#中ICodeVisitor类的典型用法代码示例。如果您正苦于以下问题:C# ICodeVisitor类的具体用法?C# ICodeVisitor怎么用?C# ICodeVisitor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICodeVisitor类属于命名空间,在下文中一共展示了ICodeVisitor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Dispatch
public override void Dispatch(ICodeVisitor visitor) {
CompileTimeConstant labelIndex = new CompileTimeConstant(this.rootClass.GetLabelIndex(this.TargetLabel.Name), this.TargetLabel.SourceLocation);
labelIndex.SetContainingExpression(this.TargetLabel);
List<Expression> arguments = new List<Expression>(1);
arguments.Add(labelIndex);
IMethodDefinition constructor = Dummy.Method;
foreach (IMethodDefinition cons in this.rootClass.TypeDefinition.GetMembersNamed(this.Compilation.NameTable.Ctor, false)) {
constructor = cons; break;
}
Expression thisArgument = new CreateObjectInstanceForResolvedConstructor(constructor, arguments, this.SourceLocation);
//^ assume this.ContainingBlock.ContainingMethodDeclaration != null;
MethodCall mcall = new ResolvedMethodCall(this.rootClass.MainMethod.MethodDefinition, thisArgument, new List<Expression>(0), this.SourceLocation);
ExpressionStatement gosub = new ExpressionStatement(mcall);
gosub.Dispatch(visitor);
}
示例2: Accept
public static void Accept(this Collection<ExceptionHandler> col, ICodeVisitor visitor)
{
col.ToList().ForEach(e => visitor.VisitExceptionHandler(e));
}
示例3: Dispatch
/// <summary>
///
/// </summary>
/// <param name="visitor"></param>
public void Dispatch(ICodeVisitor visitor) {
visitor.Visit(this);
}
示例4: Accept
public abstract void Accept(ICodeVisitor visitor);
示例5: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
this.WrappedStatement.Dispatch(visitor);
}
示例6: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitInstructionCollection (this);
}
示例7: Dispatch
public void Dispatch(ICodeVisitor visitor) {
}
示例8: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitMethodBody (this);
if (HasVariables)
m_variables.Accept (visitor);
m_instructions.Accept (visitor);
if (HasExceptionHandlers)
m_exceptions.Accept (visitor);
if (HasScopes)
m_scopes.Accept (visitor);
visitor.TerminateMethodBody (this);
}
示例9: Dispatch
/// <summary>
/// Calls visitor.Visit(INamedArgument).
/// </summary>
public override void Dispatch(ICodeVisitor visitor)
{
visitor.Visit((INamedArgument)this);
}
示例10: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitVariableDefinitionCollection (this);
}
示例11: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitScopeCollection (this);
}
示例12: Accept
public override void Accept (ICodeVisitor visitor)
{
visitor.VisitVariableDefinition (this);
}
示例13: Dispatch
public override void Dispatch(ICodeVisitor visitor)
{
//Debug.Assert(false); //Objects of this class are not supposed to escape.
}
示例14: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitScope (this);
}
示例15: Accept
public void Accept (ICodeVisitor visitor)
{
visitor.VisitExceptionHandler (this);
}