// OR public override ASTNode VisitInfixOr(CLUBSParser.InfixOrContext context) { OrNode node = new OrNode(new SourcePosition(context.start)); node.Left = Visit(context.left) as ExpressionNode; node.Right = Visit(context.right) as ExpressionNode; return(node); }
public abstract T Visit(OrNode node, object obj);
// OR public override string Visit(OrNode node, object obj) { return($"{Visit(node.Left, obj)} || {Visit(node.Right, obj)}"); }
// OR public override TypeNode Visit(OrNode node, object obj) { return(VisitInfixBoolExpression(node)); // Call generic infix boolean visit method }