// AND
        public override ASTNode VisitInfixAnd(CLUBSParser.InfixAndContext context)
        {
            AndNode node = new AndNode(new SourcePosition(context.start));

            node.Left  = Visit(context.left) as ExpressionNode;
            node.Right = Visit(context.right) as ExpressionNode;

            return(node);
        }
예제 #2
0
 public abstract T Visit(AndNode node, object obj);
 // AND
 public override string Visit(AndNode node, object obj)
 {
     return($"{Visit(node.Left, obj)} && {Visit(node.Right, obj)}");
 }
예제 #4
0
 // AND
 public override TypeNode Visit(AndNode node, object obj)
 {
     return(VisitInfixBoolExpression(node)); // Call generic infix boolean visit method
 }