cljs.repl/mapped-line-and-column
function | removed v0.0-3148 | added v0.0-2814 | Edit |
(mapped-line-and-column source-map line column)
Source docstring:
Given a cljs.source-map source map data structure map a generated line
and column back to the original line and column.
(defn mapped-line-and-column
[source-map line column]
(let [default [line column]]
(if-let [columns (get source-map (dec line))]
(vec
(map inc
(map
(last
(if-let [mapping (get columns (dec column))]
mapping
(second (first columns))))
[:line :col])))
default)))