diff options
author | Eduardo Julian | 2017-09-19 19:24:09 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-09-19 19:24:09 -0400 |
commit | 3744a2212a89d4ab0f176350d2d2f90696235a40 (patch) | |
tree | 28e9da49deddcb8253fca2ae94f479ba64cb5536 /new-luxc/source/luxc/generator/expr.jvm.lux | |
parent | e6afba3e17f03ed0652d18a26d0f3c053a49e7a5 (diff) |
- Function generation.
Diffstat (limited to 'new-luxc/source/luxc/generator/expr.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/generator/expr.jvm.lux | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/generator/expr.jvm.lux b/new-luxc/source/luxc/generator/expr.jvm.lux index 0bdebe555..6b6c68fde 100644 --- a/new-luxc/source/luxc/generator/expr.jvm.lux +++ b/new-luxc/source/luxc/generator/expr.jvm.lux @@ -1,16 +1,20 @@ (;module: lux (lux (control monad) + (data text/format) [macro #+ Monad<Lux> "Lux/" Monad<Lux>]) (luxc ["&" base] (lang ["ls" synthesis]) ["&;" analyser] ["&;" synthesizer] + (synthesizer [";S" function]) (generator ["&;" common] ["&;" primitive] ["&;" structure] ["&;" eval] ["&;" procedure] + ["&;" function] + ["&;" reference] (host ["$" jvm])))) (def: #export (generate synthesis) @@ -35,6 +39,17 @@ (#ls;Tuple members) (&structure;generate-tuple generate members) + (#ls;Variable var) + (if (functionS;captured? var) + (&reference;generate-captured var) + (&reference;generate-variable var)) + + (#ls;Function arity env body) + (&function;generate-function generate env arity body) + + (#ls;Call args function) + (&function;generate-call generate function args) + (#ls;Procedure name args) (&procedure;generate-procedure generate name args) |