@1c-syntax/codemirror-lang-bsl
    Preparing search index...

      @1c-syntax/codemirror-lang-bsl

      CodeMirror 6 language support for 1C:Enterprise (BSL) and OneScript.

      The package exports three things:

      • bsl — factory returning a LanguageSupport extension you drop straight into a CodeMirror EditorState.
      • bslLanguage — the underlying LRLanguage instance, useful if you want to attach extra LanguageSupport extras (autocompletion data, lint sources, …) without re-creating the parser.
      • sdblLanguage — a stand-alone LRLanguage for the SDBL query language. You normally don't have to touch it directly: when a BSL string literal starts with ВЫБРАТЬ/SELECT/УНИЧТОЖИТЬ/DROP the BSL parser mounts SDBL as an overlay via parseMixed. Export is provided for cases where you want to highlight a stand-alone query buffer.

      The styleTags mapping is informed by the bsl-language-server SemanticTokensProvider tree, which encodes the canonical BSL → LSP semantic-token mapping used by the official language server.

      Basic editor:

      import {EditorView, basicSetup} from "codemirror"
      import {bsl} from "@1c-syntax/codemirror-lang-bsl"

      new EditorView({
      doc: 'Процедура Тест() Сообщить("Привет"); КонецПроцедуры',
      extensions: [basicSetup, bsl()],
      parent: document.body
      })

      Highlighting a stand-alone SDBL query buffer:

      import {EditorState} from "@codemirror/state"
      import {LanguageSupport} from "@codemirror/language"
      import {sdblLanguage} from "@1c-syntax/codemirror-lang-bsl"

      EditorState.create({
      doc: "ВЫБРАТЬ * ИЗ Справочник.Контрагенты",
      extensions: [new LanguageSupport(sdblLanguage)]
      })

      Variables

      sdblLanguage
      bslLanguage

      Functions

      bsl