@gmb/bitmark-parser - v7.2.0
    Preparing search index...

    Function diagnostics

    • Every issue the JSON parser envelope would carry for bitmark source, as LSP Diagnostics with encoded positions (PLAN-196) — the typed form of convert(input, { inputFormat: "bitmark", outputFormat: "diagnostics" }).

      Parse and validate, no serialization: cheap enough to run on every keystroke. Same codes, same spans and same order as the envelope's errors / warnings / infos, whose buckets become LSP severities 1 / 2 / 3. code is the contract; message is prose. data.bit is the bit's index in the JSON array. Feed the list to editor.setModelMarkers (Monaco) or publishDiagnostics (LSP) as is.

      Parameters

      • input: string

        Bitmark source text.

      • options: DiagnosticsOptions = {}

        positionEncoding ("utf-16", the default, or "utf-8").

      Returns Diagnostics

      A Diagnostics object.

      On a variant built without editor (an unsupported error).