1
0
mirror of https://github.com/janet-lang/janet synced 2025-12-01 14:28:05 +00:00

Remove top-level unquote for comptime macro

True top level unquote currently requires basically double compilation
as it currently stands. Also, implementing such double compilation
looses all source mapping information. This is a compromise
implementation that makes it clear that this works differently than
a true top-level unquote.
This commit is contained in:
Calvin Rose
2019-12-04 19:53:13 -06:00
parent 11a7a7069a
commit 49954c7a30
3 changed files with 13 additions and 5 deletions

View File

@@ -273,8 +273,8 @@
# Top level unquote
(defn constantly
[]
,(math/random))
(comptime (math/random)))
(assert (= (constantly) (constantly)) "top level unquote")
(assert (= (constantly) (constantly)) "comptime 1")
(end-suite)