From bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 15 Jun 2018 00:11:33 -0400 Subject: - WIP: Adjustments to new-luxc based on recent changes to stdlib. --- .../luxc/lang/translation/jvm/expression.jvm.lux | 44 ++++++++++------------ 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux index 42b4f3358..a587d2e5b 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux @@ -6,12 +6,12 @@ (data ["e" error] text/format) [macro] - (macro ["s" syntax])) - (luxc ["&" lang] - (lang [".L" variable #+ Variable Register] - [".L" extension] - (host ["$" jvm]) - ["ls" synthesis])) + (macro ["s" syntax]) + ["//" lang] + (lang ["//." reference #+ Register] + ["//." synthesis #+ Synthesis] + ["//." extension])) + (luxc (lang (host ["$" jvm]))) (// [".T" common] [".T" primitive] [".T" structure] @@ -30,23 +30,19 @@ ) (def: #export (translate synthesis) - (-> ls.Synthesis (Meta $.Inst)) + (-> Synthesis (Meta $.Inst)) (case synthesis - (^code []) - primitiveT.translate-unit - - (^code [(~ singleton)]) - (translate singleton) - - (^template [ ] - [_ ( value)] - ( value)) - ([#.Bool primitiveT.translate-bool] - [#.Nat primitiveT.translate-nat] - [#.Int primitiveT.translate-int] - [#.Deg primitiveT.translate-deg] - [#.Frac primitiveT.translate-frac] - [#.Text primitiveT.translate-text]) + (^ (//synthesis.bool value)) + (primitiveT.translate-bool value) + + (^ (//synthesis.i64 value)) + (primitiveT.translate-i64 value) + + (^ (//synthesis.f64 value)) + (primitiveT.translate-f64 value) + + (^ (//synthesis.text value)) + (primitiveT.translate-text value) (^code ((~ [_ (#.Nat tag)]) (~ [_ (#.Bool last?)]) (~ valueS))) (structureT.translate-variant translate tag last? valueS) @@ -74,7 +70,7 @@ (functionT.translate-function translate environment arity bodyS) _ - (&.throw Invalid-Function-Syntax (%code synthesis))) + (//.throw Invalid-Function-Syntax (%code synthesis))) (^code ("lux call" (~ functionS) (~+ argsS))) (functionT.translate-call translate functionS argsS) @@ -86,5 +82,5 @@ ## (translation argsS)) _ - (&.throw Unrecognized-Synthesis (%code synthesis)) + (//.throw Unrecognized-Synthesis (%code synthesis)) )) -- cgit v1.2.3