public override Value VisitIs_not(calculatorParser.Is_notContext context) { Value ret = Visit(context.expr()); if (ret.asBoolean() == true) { return(new Value(false)); } if (ret.asBoolean() == false) { return(new Value(true)); } return(new Value(-1)); }
/// <summary> /// Visit a parse tree produced by <see cref="calculatorParser.is_not"/>. /// <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 VisitIs_not([NotNull] calculatorParser.Is_notContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="calculatorParser.is_not"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitIs_not([NotNull] calculatorParser.Is_notContext context) { }