Proto.diagnostic: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/proto.bend as Proto Lines 66-71 of bolt@1.27.0.0/src/lsp/proto.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&start_line=66&end_line=71 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/lsp/report.bend as Rep import bolt@1.27.0.0/src/lsp/enc.bend as Enc # the checker gives a line and no columns: a diagnostic covers its whole line def diagnostic(+cc: Enc.Cols, dd: Rep.Diag) -> J.Json: Rep.Diag{+line, msg} = dd Ezjson.obj([ ("range", Ezjson.obj([("start", position(cc, line, 0)), ("end", position(cc, (line + 1 : U32), 0))])), ("severity", J.JNum{U32.show(1)}), ("source", J.JStr{"bend"}), ("message", J.JStr{msg})]) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&name=Cols https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&name=position https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/report.bend&name=Diag https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=obj https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json