/// <summary> /// Visit a parse tree produced by <see cref="Generated.Z80TestParser.andExpr"/>. /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public override object VisitAndExpr(Z80TestParser.AndExprContext context) { if (IsInvalidContext(context)) { return(null); } var expr = VisitEquExpr(context.equExpr()[0]); for (var i = 1; i < context.equExpr().Length; i++) { var rightExpr = VisitEquExpr(context.equExpr()[i]); expr = new BitwiseAndOperationNode(context) { LeftOperand = (ExpressionNode)expr, RightOperand = (ExpressionNode)rightExpr }; } return(expr); }
/// <summary> /// Exit a parse tree produced by <see cref="Z80TestParser.andExpr"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitAndExpr([NotNull] Z80TestParser.AndExprContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="Z80TestParser.andExpr"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitAndExpr([NotNull] Z80TestParser.AndExprContext context) { return(VisitChildren(context)); }