diff options
author | Eduardo Julian | 2019-06-16 04:06:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-06-16 04:06:47 -0400 |
commit | 4bf2dce01f51a5b0be76a587f877d1227c3982ae (patch) | |
tree | 8a3a31be070e3ba04fc5e79b9c17c151f90677a6 /stdlib/source/lux/tool/compiler/phase/generation/js/case.lux | |
parent | 0cc98bbe9cae3fd9fc50d8c78c1deaba7e557531 (diff) |
Fixes and adaptations for the JavaScript compiler.
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/generation/js/case.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/generation/js/case.lux | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux index c2e0f667e..9e066b88d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/case.lux @@ -220,21 +220,20 @@ ([/////synthesis.path/seq _.then] [/////synthesis.path/alt alternation]))) -(def: (pattern-matching stack-init generate pathP) - (-> Expression Phase Path (Operation Statement)) +(def: (pattern-matching generate pathP) + (-> Phase Path (Operation Statement)) (do ////.monad [pattern-matching! (pattern-matching' generate pathP)] (wrap ($_ _.then (_.do-while _.false pattern-matching!) - (_.statement (//runtime.io//log stack-init)) (_.throw (_.string case.pattern-matching-error)))))) (def: #export (case generate [valueS pathP]) (-> Phase [Synthesis Path] (Operation Computation)) (do ////.monad [stack-init (generate valueS) - path! (pattern-matching stack-init generate pathP) + path! (pattern-matching generate pathP) #let [closure (<| (_.closure (list)) ($_ _.then (_.declare @temp) |