1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-23 11:47:40 +00:00

Sourcemapping uses line, column instead of offsets.

This should be friendlier to most users. It does, however, mean
we lose range information. However, range information could be
recovered by re-parsing, as janet's grammar is simple enough to do this.
This commit is contained in:
Calvin Rose
2019-09-22 17:18:28 -05:00
parent 228d045a06
commit a8afc5b81f
13 changed files with 177 additions and 164 deletions

View File

@@ -155,5 +155,12 @@
(assert (= (|(+ $1 $1 $1 $1) 2 4) 16) "function shorthand 8")
(assert (= (|(+ $0 $1 $3 $2 $6) 0 1 2 3 4 5 6) 12) "function shorthand 9")
# Simple function break
(debug/fbreak map)
(def f (fiber/new (fn [] (map inc [1 2 3])) :a))
(resume f)
(assert (= :debug (fiber/status f)) "debug/fbreak")
(debug/unfbreak map)
(map inc [1 2 3])
(end-suite)