From 7b870a7bd124f35939d9089a2e21f0806a4c6e85 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 29 Oct 2017 22:21:14 -0400 Subject: - Fixed some bugs. - Improved error reporting. - Implemented macro-expansion (for JVM). - Implemented "let" compilation. --- new-luxc/source/luxc/base.lux | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'new-luxc/source/luxc/base.lux') 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)) -- cgit v1.2.3