本文整理汇总了C#中IAstVisitor.Visit方法的典型用法代码示例。如果您正苦于以下问题:C# IAstVisitor.Visit方法的具体用法?C# IAstVisitor.Visit怎么用?C# IAstVisitor.Visit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAstVisitor
的用法示例。
在下文中一共展示了IAstVisitor.Visit方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Accept
public override void Accept(IAstVisitor visitor)
{
visitor.Visit(this);
}
示例2: DoAccept
protected override object DoAccept(IAstVisitor visitor)
{
return visitor.Visit(this);
}
示例3: Visit
public override object Visit(IAstVisitor visitor)
{
return visitor.Visit(this);
}
示例4:
void IAstVisitorCompliantNode.Accept(IAstVisitor visitor)
{
visitor.Visit(this);
if (this is LiteralNode) visitor.Visit(this as LiteralNode);
if (this is ConstantNode) visitor.Visit(this as ConstantNode);
if (this is VariableNode) visitor.Visit(this as VariableNode);
if (this is ExpressionNode) visitor.Visit(this as ExpressionNode);
if (this is TermNode) visitor.Visit(this as TermNode);
if (this is NegationNode) visitor.Visit(this as NegationNode);
if (this is ImplicationNode) visitor.Visit(this as ImplicationNode);
if (this is AndNode) visitor.Visit(this as AndNode);
if (this is OrNode) visitor.Visit(this as OrNode);
}
示例5: Accept
public virtual bool Accept(IAstVisitor visitor, object parameter) {
if (visitor != null && visitor.Visit(this, parameter)) {
for (int i = 0; i < Children.Count; i++) {
var child = Children[i] as IAstNode;
if (child != null && !child.Accept(visitor, parameter))
return false;
}
return true;
}
return false;
}
示例6: Accept
public override void Accept(IAstVisitor visitor)
{
visitor.Visit(this);
Type = ExprType.StringType;
}