From 0cb55507c100f6817225e644c2d19e73940edad6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 6 Nov 2017 22:03:42 -0400 Subject: - Fixed some bugs. --- new-luxc/source/luxc/lang/translation/case.jvm.lux | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'new-luxc/source/luxc/lang/translation/case.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/case.jvm.lux b/new-luxc/source/luxc/lang/translation/case.jvm.lux index 09ffae328..3e05ba334 100644 --- a/new-luxc/source/luxc/lang/translation/case.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/case.jvm.lux @@ -199,6 +199,18 @@ $i;NULL ($i;GOTO @end))))) +(def: #export (translate-if testI thenI elseI) + (-> $;Inst $;Inst $;Inst $;Inst) + (<| $i;with-label (function [@else]) + $i;with-label (function [@end]) + (|>. testI + ($i;IFEQ @else) + thenI + ($i;GOTO @end) + ($i;label @else) + elseI + ($i;label @end)))) + (def: #export (translate-case translate valueS path) (-> (-> ls;Synthesis (Meta $;Inst)) ls;Synthesis ls;Path (Meta $;Inst)) -- cgit v1.2.3