/// <summary> /// Renders a single ConditionalExpression to VHDL /// </summary> /// <returns>The VHDL equivalent of the expression.</returns> /// <param name="e">The expression to render</param> private string RenderExpression(AST.ConditionalExpression e) { if (!Parent.Config.SUPPORTS_VHDL_2008) { throw new Exception("Unexpected conditional found when the output is not VHDL 2008 compatible"); } return(string.Format("{0} when {1} else {2}", RenderExpression(e.TrueExpression), RenderExpression(e.ConditionExpression), RenderExpression(e.FalseExpression))); }
/// <summary> /// Renders a single ConditionalExpression to VHDL /// </summary> /// <returns>The VHDL equivalent of the expression.</returns> /// <param name="e">The expression to render</param> private string RenderExpression(AST.ConditionalExpression e) { return(string.Format("{0} ? {1} : {2}", RenderExpression(e.TrueExpression), RenderExpression(e.ConditionExpression), RenderExpression(e.FalseExpression))); }