aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/generator/case.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-10-29 22:21:14 -0400
committerEduardo Julian2017-10-29 22:21:14 -0400
commit7b870a7bd124f35939d9089a2e21f0806a4c6e85 (patch)
tree076fb3544dbb1a811cfbb9dd54008b0753dead16 /new-luxc/test/test/luxc/generator/case.lux
parent2dc99a7b62fc5fc19d9982ad4398606f3aebb7a5 (diff)
- Fixed some bugs.
- Improved error reporting. - Implemented macro-expansion (for JVM). - Implemented "let" compilation.
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/generator/case.lux13
1 files changed, 8 insertions, 5 deletions
diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux
index 34846a988..f9e165c03 100644
--- a/new-luxc/test/test/luxc/generator/case.lux
+++ b/new-luxc/test/test/luxc/generator/case.lux
@@ -12,6 +12,7 @@
[analyser]
[synthesizer]
(generator ["@" case]
+ [";G" expr]
["@;" eval]
["@;" runtime]
["@;" common]))
@@ -72,9 +73,10 @@
(test "Can generate pattern-matching."
(|> (do meta;Monad<Meta>
[runtime-bytecode @runtime;generate
- sampleI (@;generate valueS
- (#ls;AltP (#ls;SeqP path (#ls;ExecP (#ls;Bool true)))
- (#ls;SeqP (#ls;BindP +0) (#ls;ExecP (#ls;Bool false)))))]
+ sampleI (@;generate-case exprG;generate
+ valueS
+ (#ls;AltP (#ls;SeqP path (#ls;ExecP (#ls;Bool true)))
+ (#ls;SeqP (#ls;BindP +0) (#ls;ExecP (#ls;Bool false)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueG)
@@ -85,8 +87,9 @@
(test "Can bind values."
(|> (do meta;Monad<Meta>
[runtime-bytecode @runtime;generate
- sampleI (@;generate (#ls;Nat to-bind)
- (#ls;SeqP (#ls;BindP +1) (#ls;ExecP (#ls;Variable 1))))]
+ sampleI (@;generate-case exprG;generate
+ (#ls;Nat to-bind)
+ (#ls;SeqP (#ls;BindP +1) (#ls;ExecP (#ls;Variable 1))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueG)