aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source
diff options
context:
space:
mode:
authorEduardo Julian2019-03-11 22:37:47 -0400
committerEduardo Julian2019-03-11 22:37:47 -0400
commit1eb6b78371db11cf7ee9ec4d6d8955fc53e8e276 (patch)
tree0082f9869cc91d50615f3d53e20ac4fc99be7ef7 /stdlib/source
parent88131ea520f1b2749c239227463d521930c08d0a (diff)
Improved error-reporting after using "with-expansions" by retaining the cursors.
Diffstat (limited to '')
-rw-r--r--stdlib/source/lux.lux14
1 files 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 [<tag> <ctor>]
- [_ (<tag> elems)]
+ (^template [<tag>]
+ [cursor (<tag> elems)]
(do maybe-monad
[placements (monad/map maybe-monad (place-tokens label tokens) elems)]
- (wrap (list (<ctor> (list/join placements))))))
- ([#Tuple tuple$]
- [#Form form$])
+ (wrap (list [cursor (<tag> (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)