diff options
author | Eduardo Julian | 2017-05-17 20:23:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-05-17 20:23:02 -0400 |
commit | 8bd1d1b3a4750b26f1540717839c1aa196f2a520 (patch) | |
tree | cc9d595998c3bf4d15e434480f5505fd491e39b0 /new-luxc/source/luxc/compiler/common.jvm.lux | |
parent | 824482b2e8b13e42a524a5e4945ea3e172395c9e (diff) |
- Renamed "Error" to "Result".
Diffstat (limited to 'new-luxc/source/luxc/compiler/common.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/compiler/common.jvm.lux | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/compiler/common.jvm.lux b/new-luxc/source/luxc/compiler/common.jvm.lux index d7abc1ff1..bd5487ef6 100644 --- a/new-luxc/source/luxc/compiler/common.jvm.lux +++ b/new-luxc/source/luxc/compiler/common.jvm.lux @@ -1,7 +1,7 @@ (;module: lux (lux (concurrency ["A" atom]) - (data ["E" error] + (data ["R" result] (coll ["D" dict])) [macro] [host #+ jvm-import])) @@ -33,13 +33,13 @@ (:! Host) (get@ #visitor))) -(def: (visitor::put visitor compiler) - (-> MethodVisitor Compiler Compiler) +(def: (visitor::put ?visitor compiler) + (-> (Maybe MethodVisitor) Compiler Compiler) (update@ #;host (function [host] (|> host (:! Host) - (set@ #visitor (#;Some visitor)) + (set@ #visitor ?visitor) (:! Void))) compiler)) @@ -48,18 +48,18 @@ (function [compiler] (case (visitor::get compiler) #;None - (#E;Error "No visitor has been set.") + (#R;Error "No visitor has been set.") (#;Some visitor) - (#E;Success [compiler visitor])))) + (#R;Success [compiler visitor])))) (def: #export (with-visitor visitor body) (All [a] (-> MethodVisitor (Lux a) (Lux a))) (function [compiler] - (case (macro;run' (visitor::put visitor compiler) body) - (#E;Error error) - (#E;Error error) + (case (macro;run' (visitor::put (#;Some visitor) compiler) body) + (#R;Error error) + (#R;Error error) - (#E;Success [compiler' output]) - (#E;Success [(visitor::put (visitor::get compiler) compiler') + (#R;Success [compiler' output]) + (#R;Success [(visitor::put (visitor::get compiler) compiler') output])))) |