(defn
seg->map
"Take a source map segment represented as a vector\n and return a map."
[seg source-map]
(let
[[gcol source line col name] seg]
{:gcol gcol,
:source (aget (gobj/get source-map "sources") source),
:line line,
:col col,
:name
(when-let
[name (-> seg meta :name)]
(aget (gobj/get source-map "names") name))}))