public override Value VisitAndExpr(AbstractIfStmtParser.AndExprContext ctx) { Value left = this.Visit(ctx.expr(0)); Value right = this.Visit(ctx.expr(1)); bool leftBoolVal = getBoolValue(left); bool rightBoolVal = getBoolValue(right); bool andExprVal = leftBoolVal && rightBoolVal; return(new Value(andExprVal)); }
/// <summary> /// Visit a parse tree produced by <see cref="AbstractIfStmtParser.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] AbstractIfStmtParser.AndExprContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="AbstractIfStmtParser.andExpr"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitAndExpr([NotNull] AbstractIfStmtParser.AndExprContext context) { }