From 1eb6b78371db11cf7ee9ec4d6d8955fc53e8e276 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 11 Mar 2019 22:37:47 -0400 Subject: Improved error-reporting after using "with-expansions" by retaining the cursors. --- stdlib/source/lux.lux | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stdlib/source/lux.lux b/stdlib/source/lux.lux index 9a90885b9..5514d1939 100644 --- a/stdlib/source/lux.lux +++ b/stdlib/source/lux.lux @@ -5481,15 +5481,15 @@ (#Some tokens) (#Some (list target))) - (^template [ ] - [_ ( elems)] + (^template [] + [cursor ( elems)] (do maybe-monad [placements (monad/map maybe-monad (place-tokens label tokens) elems)] - (wrap (list ( (list/join placements)))))) - ([#Tuple tuple$] - [#Form form$]) + (wrap (list [cursor ( (list/join placements))])))) + ([#Tuple] + [#Form]) - [_ (#Record pairs)] + [cursor (#Record pairs)] (do maybe-monad [=pairs (monad/map maybe-monad (: (-> [Code Code] (Maybe [Code Code])) @@ -5504,7 +5504,7 @@ _ #None)))) pairs)] - (wrap (list (record$ =pairs)))) + (wrap (list [cursor (#Record =pairs)]))) )) (macro: #export (with-expansions tokens) -- cgit v1.2.3