private object ResolveConditionalExpression(ProfaneParser.ConditionExprContext conditionExprContext) { var leftExpr = conditionExprContext.expr().First(); var rightExpr = conditionExprContext.expr().Last(); var left = ResolveExpression(leftExpr); var right = ResolveExpression(rightExpr); return(left + conditionExprContext.relop().GetText() + right); }
/// <summary> /// Exit a parse tree produced by <see cref="ProfaneParser.conditionExpr"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitConditionExpr([NotNull] ProfaneParser.ConditionExprContext context) { }