def locations.go

bolt@1.27.0.0 · src/lsp/proto.bend:286

import bolt@1.27.0.0/src/lsp/proto.bend as Proto
import Base
import emerging-ezjson@1.2.0.0/main.bend as Ezjson
import emerging-ezjson@1.2.0.0/src/value.bend as J
import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import bolt@1.27.0.0/src/lsp/enc.bend as Enc

286def locations.go(ps: List<&2, Bind.Pos>, +cc: Enc.Cols, +uri: String, +name: String) -> List<&2, J.Json>:
287  match ps:
288    case Nil{}:
289      Nil{}
290    case Con{Bind.Pos{l, c}, rest}:
291      Ezjson.obj([("uri", J.JStr{uri}), ("range", name_range(cc, l, c, name))]) <> locations.go(rest, cc, uri, name)

Uses (8)

Used by (1)