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

    Function semanticTokens

    • Parser-derived highlighting of bitmark source in the LSP semantic-tokens shape (PLAN-193) — the typed form of convert(input, { inputFormat: "bitmark", outputFormat: "semantic-tokens" }).

      The parser runs (never the validator) and every byte of the source is covered exactly once: unpaired marks are text, an abandoned tag is text and the dividers it would have swallowed keep their meaning, a raw body ([.code], ==== text ====) is one plain-text run per line. Token types name sigil classes and syntax positions, never a bit or tag name; the tag class, the commented-bit flag and unclosed are modifiers. Both layouts carry the legend, so the response is self-describing.

      Parameters

      • input: string

        Bitmark source text.

      • options: SemanticTokensOptions = {}

        positionEncoding ("utf-16", the default, or "utf-8") and tokensLayout ("lsp", the default, or "absolute").

      Returns SemanticTokens

      A SemanticTokens object, discriminated by layout.

      On a variant built without semantic-tokens (an unsupported error).