public override Value VisitNotExpr(AbstractIfStmtParser.NotExprContext ctx) { Value value = this.Visit(ctx.expr()); bool bVal = getBoolValue(value); return(new Value(!bVal)); //return new Value(!value.asBoolean()); }
/// <summary> /// Visit a parse tree produced by <see cref="AbstractIfStmtParser.notExpr"/>. /// <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 VisitNotExpr([NotNull] AbstractIfStmtParser.NotExprContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="AbstractIfStmtParser.notExpr"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitNotExpr([NotNull] AbstractIfStmtParser.NotExprContext context) { }