diff options
author | Eduardo Julian | 2017-10-29 22:21:14 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-29 22:21:14 -0400 |
commit | 7b870a7bd124f35939d9089a2e21f0806a4c6e85 (patch) | |
tree | 076fb3544dbb1a811cfbb9dd54008b0753dead16 /new-luxc/source/luxc/base.lux | |
parent | 2dc99a7b62fc5fc19d9982ad4398606f3aebb7a5 (diff) |
- Fixed some bugs.
- Improved error reporting.
- Implemented macro-expansion (for JVM).
- Implemented "let" compilation.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/base.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/base.lux b/new-luxc/source/luxc/base.lux index bac16fd79..580f5593f 100644 --- a/new-luxc/source/luxc/base.lux +++ b/new-luxc/source/luxc/base.lux @@ -27,8 +27,8 @@ #let [location (format file "," (|> line nat-to-int %i) "," (|> col nat-to-int %i))]] - (meta;fail (format "@ " location - "\n" message)))) + (meta;fail (format message "\n\n" + "@ " location)))) (def: #export (assert message test) (-> Text Bool (Meta Unit)) @@ -57,7 +57,7 @@ (function [compiler] (case (action (get@ #;type-context compiler)) (#e;Error error) - (#e;Error error) + ((fail error) compiler) (#e;Success [context' output]) (#e;Success [(set@ #;type-context context' compiler) @@ -136,7 +136,7 @@ (#e;Error error) (#e;Error (if (text/= "" error) (handler []) - (format error "\n-----------------------------------------\n" (handler []))))))) + (format (handler []) "\n\n-----------------------------------------\n\n" error)))))) (def: fresh-bindings (All [k v] (Bindings k v)) |