// 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);
        }
Example #2
0
 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)}");
 }
Example #4
0
 // OR
 public override TypeNode Visit(OrNode node, object obj)
 {
     return(VisitInfixBoolExpression(node)); // Call generic infix boolean visit method
 }