diff options
author | Eduardo Julian | 2017-11-01 13:36:15 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-11-01 13:36:15 -0400 |
commit | 88006e957373bbd72ec68897474303964885fc68 (patch) | |
tree | a34f88ea0921f56737c8881345245e11e7c8b546 /new-luxc/source/luxc/lang/translation/expression.jvm.lux | |
parent | 012f6bd41e527479dddbccbdab10daa78fd9a0fd (diff) |
- Minor refactorings.
- Fixed some bugs.
- Enabled macro-expansion for statements.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/expression.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/expression.jvm.lux | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/new-luxc/source/luxc/lang/translation/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/expression.jvm.lux index af66d4994..81cdc1261 100644 --- a/new-luxc/source/luxc/lang/translation/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/expression.jvm.lux @@ -22,54 +22,54 @@ (exception: #export Unrecognized-Synthesis) -(def: #export (generate synthesis) +(def: #export (translate synthesis) (-> ls;Synthesis (Meta $;Inst)) (case synthesis (^code []) - primitiveT;generate-unit + primitiveT;translate-unit (^code [(~ singleton)]) - (generate singleton) + (translate singleton) (^template [<tag> <generator>] [_ (<tag> value)] (<generator> value)) - ([#;Bool primitiveT;generate-bool] - [#;Nat primitiveT;generate-nat] - [#;Int primitiveT;generate-int] - [#;Deg primitiveT;generate-deg] - [#;Frac primitiveT;generate-frac] - [#;Text primitiveT;generate-text]) + ([#;Bool primitiveT;translate-bool] + [#;Nat primitiveT;translate-nat] + [#;Int primitiveT;translate-int] + [#;Deg primitiveT;translate-deg] + [#;Frac primitiveT;translate-frac] + [#;Text primitiveT;translate-text]) (^code ((~ [_ (#;Nat tag)]) (~ [_ (#;Bool last?)]) (~ valueS))) - (structureT;generate-variant generate tag last? valueS) + (structureT;translate-variant translate tag last? valueS) (^code [(~@ members)]) - (structureT;generate-tuple generate members) + (structureT;translate-tuple translate members) (^ [_ (#;Form (list [_ (#;Int var)]))]) (if (variableL;captured? var) - (referenceT;generate-captured var) - (referenceT;generate-variable var)) + (referenceT;translate-captured var) + (referenceT;translate-variable var)) [_ (#;Symbol definition)] - (referenceT;generate-definition definition) + (referenceT;translate-definition definition) (^code ("lux let" (~ [_ (#;Nat register)]) (~ inputS) (~ exprS))) - (caseT;generate-let generate register inputS exprS) + (caseT;translate-let translate register inputS exprS) (^code ("lux case" (~ inputS) (~ pathPS))) - (caseT;generate-case generate inputS pathPS) + (caseT;translate-case translate inputS pathPS) (^multi (^code ("lux function" (~ [_ (#;Nat arity)]) [(~@ environment)] (~ bodyS))) [(s;run environment (p;some s;int)) (#e;Success environment)]) - (functionT;generate-function generate environment arity bodyS) + (functionT;translate-function translate environment arity bodyS) (^code ("lux call" (~ functionS) (~@ argsS))) - (functionT;generate-call generate functionS argsS) + (functionT;translate-call translate functionS argsS) (^code ((~ [_ (#;Text procedure)]) (~@ argsS))) - (procedureT;generate-procedure generate procedure argsS) + (procedureT;translate-procedure translate procedure argsS) _ (&;throw Unrecognized-Synthesis (%code synthesis)) |