diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/extension/common.lux | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux b/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux index cc703f17d..6d3cbbd46 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux @@ -19,6 +19,8 @@ [tool [compiler ["." phase] + [meta + [archive (#+ Archive)]] [language [lux ["." synthesis (#+ Synthesis %synthesis)] @@ -40,12 +42,12 @@ (def: #export (custom [parser handler]) (All [s] (-> [(Parser s) - (-> Text Phase s (Operation Inst))] + (-> Text Phase Archive s (Operation Inst))] Handler)) - (function (_ extension-name phase input) + (function (_ extension-name phase archive input) (case (<s>.run parser input) (#try.Success input') - (handler extension-name phase input') + (handler extension-name phase archive input') (#try.Failure error) (phase.throw extension.invalid-syntax [extension-name %synthesis input])))) @@ -87,17 +89,17 @@ (<>.some (<s>.tuple ($_ <>.and (<s>.tuple (<>.many <s>.i64)) <s>.any)))) - (function (_ extension-name phase [input else conditionals]) + (function (_ extension-name phase archive [input else conditionals]) (<| _.with-label (function (_ @end)) _.with-label (function (_ @else)) (do phase.monad - [inputG (phase input) - elseG (phase else) + [inputG (phase archive input) + elseG (phase archive else) conditionalsG+ (: (Operation (List [(List [Int Label]) Inst])) (monad.map @ (function (_ [chars branch]) (do @ - [branchG (phase branch)] + [branchG (phase archive branch)] (wrap (<| _.with-label (function (_ @branch)) [(list@map (function (_ char) [(.int char) @branch]) |