aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/generator
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/generator')
-rw-r--r--new-luxc/source/luxc/generator/expr.jvm.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/generator/expr.jvm.lux b/new-luxc/source/luxc/generator/expr.jvm.lux
index b439ff17a..61120ef86 100644
--- a/new-luxc/source/luxc/generator/expr.jvm.lux
+++ b/new-luxc/source/luxc/generator/expr.jvm.lux
@@ -27,10 +27,10 @@
(def: #export (generate synthesis)
(-> ls;Synthesis (Meta $;Inst))
(case synthesis
- [_ (#;Tuple #;Nil)]
+ (^code [])
&primitive;generate-unit
- (^ [_ (#;Tuple (list singleton))])
+ (^code [(~ singleton)])
(generate singleton)
(^template [<tag> <generator>]
@@ -43,10 +43,10 @@
[#;Frac &primitive;generate-frac]
[#;Text &primitive;generate-text])
- (^ [_ (#;Form (list [_ (#;Nat tag)] [_ (#;Bool last?)] valueS))])
+ (^code ((~ [_ (#;Nat tag)]) (~ [_ (#;Bool last?)]) (~ valueS)))
(&structure;generate-variant generate tag last? valueS)
-
- [_ (#;Tuple members)]
+
+ (^code [(~@ members)])
(&structure;generate-tuple generate members)
(^ [_ (#;Form (list [_ (#;Int var)]))])
@@ -57,20 +57,20 @@
[_ (#;Symbol definition)]
(&reference;generate-definition definition)
- (^ [_ (#;Form (list [_ (#;Text "lux let")] [_ (#;Nat register)] inputS exprS))])
+ (^code ("lux let" (~ [_ (#;Nat register)]) (~ inputS) (~ exprS)))
(caseG;generate-let generate register inputS exprS)
- (^ [_ (#;Form (list [_ (#;Text "lux case")] inputS pathPS))])
+ (^code ("lux case" (~ inputS) (~ pathPS)))
(caseG;generate-case generate inputS pathPS)
- (^multi (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat arity)] [_ (#;Tuple environment)] bodyS))])
+ (^multi (^code ("lux function" (~ [_ (#;Nat arity)]) [(~@ environment)] (~ bodyS)))
[(s;run environment (p;some s;int)) (#e;Success environment)])
(&function;generate-function generate environment arity bodyS)
- (^ [_ (#;Form (list& [_ (#;Text "lux call")] functionS argsS))])
+ (^code ("lux call" (~ functionS) (~@ argsS)))
(&function;generate-call generate functionS argsS)
- (^ [_ (#;Form (list& [_ (#;Text procedure)] argsS))])
+ (^code ((~ [_ (#;Text procedure)]) (~@ argsS)))
(&procedure;generate-procedure generate procedure argsS)
_