From bc36487224f670c23002cc4575c0dba3e5dc1be1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 15 Mar 2022 07:24:35 -0400 Subject: De-sigil-ification: ^ --- lux-jvm/source/luxc/lang/translation/jvm/case.lux | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm/case.lux') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/case.lux b/lux-jvm/source/luxc/lang/translation/jvm/case.lux index 9a5172966..8e90b4510 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/case.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/case.lux @@ -9,6 +9,8 @@ [data [collection ["[0]" list ("[1]@[0]" mix)]]] + [macro + ["^" pattern]] [math [number ["n" nat]]] @@ -128,7 +130,7 @@ (_.label @else) elseG)))) - (^template [ ] + (^.template [ ] [{ cons} (do [@ phase.monad] [forkG (: (Operation Inst) @@ -163,8 +165,8 @@ bodyI (_.GOTO @end)))) - (^template [ ] - [(^ ( lefts)) + (^.template [ ] + [(pattern ( lefts)) (operation@in (<| _.with_label (function (_ @success)) _.with_label (function (_ @fail)) (|>> peekI @@ -184,15 +186,15 @@ [synthesis.side/right true]) ... Extra optimization - (^template [ ] - [(^ ( lefts)) + (^.template [ ] + [(pattern ( lefts)) (operation@in (|>> peekI ( lefts) pushI)) - (^ (synthesis.path/seq - ( lefts) - (synthesis.!bind_top register thenP))) + (pattern (synthesis.path/seq + ( lefts) + (synthesis.!bind_top register thenP))) (do phase.monad [then! (path' stack_depth @else @end phase archive thenP)] (in (|>> peekI -- cgit v1.2.3