// 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); }
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)}"); }
// AND public override TypeNode Visit(AndNode node, object obj) { return(VisitInfixBoolExpression(node)); // Call generic infix boolean visit method }