diff options
author | Eduardo Julian | 2017-11-06 22:03:42 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-06 22:03:42 -0400 |
commit | 0cb55507c100f6817225e644c2d19e73940edad6 (patch) | |
tree | 8e99d826fc51f052b086f0398b257176dcac11cc /new-luxc/source/luxc/lang/translation/case.jvm.lux | |
parent | 69d3bdf98a5be8dd7aacc0b37bdbfcbf226faf62 (diff) |
- Fixed some bugs.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/case.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/case.jvm.lux | 12 |
1 files changed, 12 insertions, 0 deletions
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)) |