{"_id":"@1c-syntax/codemirror-lang-bsl","_rev":"5-9820137a547ca913db915e6530e82ddb","name":"@1c-syntax/codemirror-lang-bsl","dist-tags":{"latest":"0.3.2"},"versions":{"0.2.0":{"name":"@1c-syntax/codemirror-lang-bsl","version":"0.2.0","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"author":{"name":"1C-Syntax contributors"},"license":"MIT","_id":"@1c-syntax/codemirror-lang-bsl@0.2.0","maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"dist":{"shasum":"d563f2551473b3fa0c7ca9a0ee7e0d27ad0ce11b","tarball":"https://registry.npmjs.org/@1c-syntax/codemirror-lang-bsl/-/codemirror-lang-bsl-0.2.0.tgz","fileCount":8,"integrity":"sha512-9O+0uAo+2fMx7iPLE+sv2TvcBOYBcw55+xZ+PbfvNrPQ3f8Ox5C4fZmBV2pZf+PYcUm/8qhfyKI+shlQDm1JVg==","signatures":[{"sig":"MEYCIQC4kG6Y8FQb00y+bY0WpkpWh7rZbiN3dJyyVMYYKmvvtwIhAIINkxMdDEoB12JIdAAuOqvdzkGpqIfTG5t/F4OMfGIZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1c-syntax%2fcodemirror-lang-bsl@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":85605},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"f10e021d6993bcced59936ebf27079b09c47614d","scripts":{"test":"mocha 'test/test.js' 'test/*.test.js'","build":"rollup -c","prepare":"rollup -c","build:demo":"rollup -c rollup.config.demo.js","prepublishOnly":"npm test"},"_npmUser":{"name":"nixel2007","email":"nixel2007@gmail.com"},"repository":{"url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git","type":"git"},"_npmVersion":"10.9.8","description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@lezer/lr":"^1.4.0","@lezer/common":"^1.2.0","@lezer/highlight":"^1.2.0","@codemirror/language":"^6.10.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.0","tslib":"^2.8.0","rollup":"^4.0.0","codemirror":"^6.0.2","typescript":"^5.4.0","@types/node":"^22.0.0","@codemirror/view":"^6.43.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.6.0","@codemirror/search":"^6.7.0","@codemirror/commands":"^6.10.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@codemirror/autocomplete":"^6.20.2","@rollup/plugin-typescript":"^12.1.0","@codemirror/theme-one-dark":"^6.1.3","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-bsl_0.2.0_1779972904084_0.09081032465352679","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@1c-syntax/codemirror-lang-bsl","version":"0.2.1","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"author":{"name":"1C-Syntax contributors"},"license":"MIT","_id":"@1c-syntax/codemirror-lang-bsl@0.2.1","maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"dist":{"shasum":"370a403ad7a00c5afd1467af8540d60889ee4bff","tarball":"https://registry.npmjs.org/@1c-syntax/codemirror-lang-bsl/-/codemirror-lang-bsl-0.2.1.tgz","fileCount":8,"integrity":"sha512-yed+sBQ+m1Ps7XstIIBmD060YhSMgpX5F45PmuEopptIrxDqV3LrbFvWjcIbjAAC7pArDL/v9gUAyUBf4ObWEA==","signatures":[{"sig":"MEUCICojR6iM9G/HUqHgtquTKBTz9FYToquKArPZTL6vyyBvAiEA9hRbSoqjRK7ngV4IXyGZI2f9acnXZzxm9YpPV3Bb3ww=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1c-syntax%2fcodemirror-lang-bsl@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":85241},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"d3bda7522e09e49d1c5cc60ecc81f47f910dce02","scripts":{"test":"mocha 'test/test.js' 'test/*.test.js'","build":"rollup -c","prepare":"rollup -c","build:demo":"rollup -c rollup.config.demo.js","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:21ab7e2e-40e1-4b91-98a7-60c1cb56beb9"}},"repository":{"url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git","type":"git"},"_npmVersion":"11.16.0","description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@lezer/lr":"^1.4.0","@lezer/common":"^1.2.0","@lezer/highlight":"^1.2.0","@codemirror/language":"^6.10.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.0","tslib":"^2.8.0","rollup":"^4.0.0","codemirror":"^6.0.2","typescript":"^5.4.0","@types/node":"^22.0.0","@codemirror/view":"^6.43.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.6.0","@codemirror/search":"^6.7.0","@codemirror/commands":"^6.10.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@codemirror/autocomplete":"^6.20.2","@rollup/plugin-typescript":"^12.1.0","@codemirror/theme-one-dark":"^6.1.3","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-bsl_0.2.1_1779973492961_0.6678549138984884","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@1c-syntax/codemirror-lang-bsl","version":"0.3.0","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"author":{"name":"1C-Syntax contributors"},"license":"MIT","_id":"@1c-syntax/codemirror-lang-bsl@0.3.0","maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"dist":{"shasum":"f5f42718df3b6dcc1f3c573859972c88b8961d52","tarball":"https://registry.npmjs.org/@1c-syntax/codemirror-lang-bsl/-/codemirror-lang-bsl-0.3.0.tgz","fileCount":8,"integrity":"sha512-uDAlYlwbfsC25L9hlUJkLufMRhZUDyOOQbxteJIZ+1zVzrko2CJrWlhkf/DHJI6tHliIKVvvr77mI4Df8gvhPw==","signatures":[{"sig":"MEYCIQDzsyI6MPt78afZ9HEMBskkrJ2TgSV5IJoKgY6Jl1v0sAIhAOD9rkIlABOacQeFMuvnVfp19mPUGZf9Vmzb7VRuKPE1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1c-syntax%2fcodemirror-lang-bsl@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":116899},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"20a977bbeddcc5c80bcc1eb593cfc82162eded65","scripts":{"lint":"eslint .","test":"mocha 'test/test.js' 'test/*.test.js'","build":"rollup -c","prepare":"rollup -c","build:demo":"rollup -c rollup.config.demo.js","build:docs":"typedoc","build:site":"npm run build:demo && npm run build:docs","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:21ab7e2e-40e1-4b91-98a7-60c1cb56beb9"}},"repository":{"url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git","type":"git"},"_npmVersion":"11.16.0","description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@lezer/lr":"^1.4.0","@lezer/common":"^1.2.0","@lezer/highlight":"^1.2.0","@codemirror/language":"^6.10.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.0","tslib":"^2.8.0","eslint":"^9.39.4","rollup":"^4.0.0","globals":"^17.6.0","typedoc":"^0.28.19","@eslint/js":"^9.39.4","codemirror":"^6.0.2","typescript":"^5.4.0","@types/node":"^22.0.0","@codemirror/view":"^6.43.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.6.0","typescript-eslint":"^8.60.0","@codemirror/search":"^6.7.0","@codemirror/commands":"^6.10.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@codemirror/autocomplete":"^6.20.2","@rollup/plugin-typescript":"^12.1.0","@codemirror/theme-one-dark":"^6.1.3","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-bsl_0.3.0_1780047890426_0.689843648768871","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@1c-syntax/codemirror-lang-bsl","version":"0.3.1","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"author":{"name":"1C-Syntax contributors"},"license":"MIT","_id":"@1c-syntax/codemirror-lang-bsl@0.3.1","maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"dist":{"shasum":"e1dac748bccae1ae7453b75014c7da65bfebc512","tarball":"https://registry.npmjs.org/@1c-syntax/codemirror-lang-bsl/-/codemirror-lang-bsl-0.3.1.tgz","fileCount":8,"integrity":"sha512-E5Pv1Mxa1uTrxY444XBihW8lo+TOi1xGxGOMB1HKsUm8NJt4GcEa1c9bNFnnzlhOtR0UgR3dO75WADuNbICWKA==","signatures":[{"sig":"MEYCIQD5/Yn7G/JhqU6P8ha/glHCkwhySCQIIYYJuGHn+uhyCwIhALYljZDthE5WBZOg2fQcbHR1gN07lAYexG2DkHA9FSNt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1c-syntax%2fcodemirror-lang-bsl@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":117723},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"gitHead":"8556be85ee4a405a3d8a4f3f6f8dcb9fbec6a5a6","scripts":{"lint":"eslint .","test":"mocha 'test/test.js' 'test/*.test.js'","build":"rollup -c","prepare":"rollup -c","build:demo":"rollup -c rollup.config.demo.js","build:docs":"typedoc","build:site":"npm run build:demo && npm run build:docs","prepublishOnly":"npm test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:21ab7e2e-40e1-4b91-98a7-60c1cb56beb9"}},"repository":{"url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git","type":"git"},"_npmVersion":"11.16.0","description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@lezer/lr":"^1.4.0","@lezer/common":"^1.2.0","@lezer/highlight":"^1.2.0","@codemirror/language":"^6.10.0"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.0","tslib":"^2.8.0","eslint":"^9.39.4","rollup":"^4.0.0","globals":"^17.6.0","typedoc":"^0.28.19","@eslint/js":"^9.39.4","codemirror":"^6.0.2","typescript":"^5.4.0","@types/node":"^22.0.0","@codemirror/view":"^6.43.0","@lezer/generator":"^1.7.0","@codemirror/state":"^6.6.0","typescript-eslint":"^8.60.0","@codemirror/search":"^6.7.0","@codemirror/commands":"^6.10.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-commonjs":"^29.0.2","@codemirror/autocomplete":"^6.20.2","@rollup/plugin-typescript":"^12.1.0","@codemirror/theme-one-dark":"^6.1.3","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/codemirror-lang-bsl_0.3.1_1780050353358_0.7337465900674924","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@1c-syntax/codemirror-lang-bsl","version":"0.3.2","description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"repository":{"type":"git","url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git"},"license":"MIT","author":{"name":"1C-Syntax contributors"},"type":"module","main":"dist/index.cjs","module":"dist/index.js","exports":{"import":"./dist/index.js","require":"./dist/index.cjs"},"types":"dist/index.d.ts","sideEffects":false,"scripts":{"lint":"eslint .","test":"mocha 'test/test.js' 'test/*.test.js'","prepare":"rollup -c","prepublishOnly":"npm test","build":"rollup -c","build:demo":"rollup -c rollup.config.demo.js","build:docs":"typedoc","build:site":"npm run build:demo && npm run build:docs"},"dependencies":{"@codemirror/language":"^6.12.4","@lezer/common":"^1.2.0","@lezer/highlight":"^1.2.0","@lezer/lr":"^1.4.0"},"devDependencies":{"@codemirror/autocomplete":"^6.20.3","@codemirror/commands":"^6.10.4","@codemirror/search":"^6.7.1","@codemirror/state":"^6.7.1","@codemirror/theme-one-dark":"^6.1.3","@codemirror/view":"^6.43.6","@eslint/js":"^10.0.1","@lezer/generator":"^1.7.0","@rollup/plugin-commonjs":"^29.0.3","@rollup/plugin-node-resolve":"^16.0.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.1.0","@types/node":"^26.1.1","codemirror":"^6.0.2","eslint":"^10.7.0","globals":"^17.7.0","mocha":"^11.0.0","rollup":"^4.62.2","tslib":"^2.8.0","typedoc":"^0.28.20","typescript":"^6.0.3","typescript-eslint":"^8.64.0"},"gitHead":"303503f74bf87c137dfa0d145ef63a246a37149f","_id":"@1c-syntax/codemirror-lang-bsl@0.3.2","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-DHmJFHhigHuQhef5qaoJKeQuNgQtATvis1yiVPtzGaLNktg8yALDAKuNlWjoXryq4LIFcA+cPTOoq/CDId67Cg==","shasum":"67c213f61c5ac2958a1a7051bdf658ef9dd0b5fe","tarball":"https://registry.npmjs.org/@1c-syntax/codemirror-lang-bsl/-/codemirror-lang-bsl-0.3.2.tgz","fileCount":8,"unpackedSize":117724,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@1c-syntax%2fcodemirror-lang-bsl@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCr1DlGulr6FXDDkV9fJ0dp4zrMNmRR7yqVDUIP0WisyAIgZjdHzJgMqyw1Vn+kaurpnbWaDFW6CllBazCyO9+tJEg="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:21ab7e2e-40e1-4b91-98a7-60c1cb56beb9"}},"directories":{},"maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/codemirror-lang-bsl_0.3.2_1784315768315_0.19128684327080814"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T12:55:03.859Z","modified":"2026-07-17T19:16:08.814Z","0.2.0":"2026-05-28T12:55:04.221Z","0.2.1":"2026-05-28T13:04:53.109Z","0.3.0":"2026-05-29T09:44:50.623Z","0.3.1":"2026-05-29T10:25:53.489Z","0.3.2":"2026-07-17T19:16:08.494Z"},"bugs":{"url":"https://github.com/1c-syntax/codemirror-lang-bsl/issues"},"author":{"name":"1C-Syntax contributors"},"license":"MIT","homepage":"https://github.com/1c-syntax/codemirror-lang-bsl","keywords":["codemirror","codemirror6","lezer","bsl","1c","1c-enterprise","onescript","syntax-highlighting"],"repository":{"type":"git","url":"git+https://github.com/1c-syntax/codemirror-lang-bsl.git"},"description":"1C:Enterprise / OneScript (BSL) language support for CodeMirror 6","maintainers":[{"name":"nixel2007","email":"nixel2007@gmail.com"}],"readme":"# @1c-syntax/codemirror-lang-bsl\n\n[![npm](https://img.shields.io/npm/v/@1c-syntax/codemirror-lang-bsl.svg)](https://www.npmjs.com/package/@1c-syntax/codemirror-lang-bsl)\n[![CI](https://github.com/1c-syntax/codemirror-lang-bsl/actions/workflows/ci.yml/badge.svg)](https://github.com/1c-syntax/codemirror-lang-bsl/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n[CodeMirror 6](https://codemirror.net/) language support package for\n**1C:Enterprise (BSL)** and **OneScript** — Russian and English keyword syntax,\npreprocessor directives, compilation annotations, multi-line string literals,\nand embedded query language (SDBL) inside string literals.\n\n## 👉 Live demo\n\n**<https://1c-syntax.github.io/codemirror-lang-bsl/>** — two side-by-side\nCodeMirror 6 editors: one with a sample BSL module (procedure with annotation,\ncontrol flow, async function, region), another with a function whose query\nstring body is highlighted by the embedded SDBL grammar. Add `?theme=light` to\nthe URL for the light theme.\n\nAPI reference (generated from JSDoc with TypeDoc):\n**<https://1c-syntax.github.io/codemirror-lang-bsl/api/>**.\n\nThe grammar is implemented in [Lezer](https://lezer.codemirror.net/), references\nthe [`1c-syntax/bsl-parser`](https://github.com/1c-syntax/bsl-parser) ANTLR4\ngrammars for structure and the\n[`1c-syntax/vsc-language-1c-bsl`](https://github.com/1c-syntax/vsc-language-1c-bsl)\nTextMate grammar for token style mapping.\n\n## Install\n\n```bash\nnpm install @1c-syntax/codemirror-lang-bsl\n```\n\n## Usage\n\n```ts\nimport {EditorView, basicSetup} from \"codemirror\"\nimport {bsl} from \"@1c-syntax/codemirror-lang-bsl\"\n\nnew EditorView({\n  doc: 'Процедура Привет() Экспорт\\n    Сообщить(\"Привет, мир!\");\\nКонецПроцедуры',\n  extensions: [basicSetup, bsl()],\n  parent: document.body\n})\n```\n\n## What's covered\n\n- Module-level: variable declarations (`Перем`/`Var`), procedure/function\n  declarations with `Экспорт`, default parameters and `Знач`/`Val`, async\n  modifier `АСИНХ`\n- Control flow: `Если`/`ИначеЕсли`/`Иначе`/`КонецЕсли`,\n  `Пока`/`КонецЦикла`, `Для … По … Цикл`/`КонецЦикла`,\n  `Для Каждого … Из`/`КонецЦикла`, `Попытка`/`Исключение`/`КонецПопытки`\n- Statements: `Возврат`/`Продолжить`/`Прервать`/`Перейти`, labels `~Метка:`,\n  `Ждать` as both standalone statement and expression, `ВызватьИсключение`,\n  `Выполнить`, `ДобавитьОбработчик`/`УдалитьОбработчик`\n- Expressions: number literals, string literals (single-line and multi-line\n  with `|` continuation), date literals `'YYYYMMDDHHMMSS'`,\n  booleans `Истина`/`Ложь`, `Неопределено`, `Null`, `Новый`, ternary `?(…)`\n- Operators: arithmetic, comparison, logical (`И`/`Или`/`Не`)\n- Annotations: `&НаКлиенте`, `&НаСервере`, `&НаКлиентеНаСервереБезКонтекста`, …\n  including annotation parameters\n- Preprocessor: `#Если`/`#ИначеЕсли`/`#Иначе`/`#КонецЕсли`,\n  `#Область`/`#КонецОбласти`, `#Использовать`, `#native`\n- Comments: `//` (single-line), `///` (BSLDescription doc-comments)\n- **SDBL** (BSL query language) **embedded inside query string literals** —\n  a separate Lezer grammar covering 100+ keywords (statement / operator /\n  function / type / metadata-object / virtual-table categories) is mounted\n  as an overlay onto any string literal that starts with `ВЫБРАТЬ`/`SELECT`/\n  `УНИЧТОЖИТЬ`/`DROP`. Russian and English keyword variants are both\n  recognised and styled identically.\n\n## Upstream references\n\nThe grammar and style mapping are derived from the following 1c-syntax\nprojects. When updating this package, diff against the recorded commit to\ncatch grammar changes upstream.\n\n| Project | Used for | Pinned commit | Tag |\n|---------|----------|---------------|-----|\n| [`1c-syntax/bsl-parser`](https://github.com/1c-syntax/bsl-parser) | Lexer/parser structure (BSL + SDBL ANTLR4 grammars) | `a30f8169885836226208041fbc41001bd64d710e` | `v0.34.1` |\n| [`1c-syntax/vsc-language-1c-bsl`](https://github.com/1c-syntax/vsc-language-1c-bsl) | TextMate scope reference (`1c.tmLanguage.json`, `1c-query.tmLanguage.json`) | `30e6c7994a2ee745c92fa0238fa2e81c78d4781d` | `v1.33.1` |\n| [`1c-syntax/bsl-language-server`](https://github.com/1c-syntax/bsl-language-server) | Semantic-token → LSP token type mapping (`SemanticTokensProvider`, `*SemanticTokensSupplier`) — pinned against the active `develop` branch, not the latest release | `be49fcbf45d082a1db15504b51a551f6a55183c0` (`develop`) | latest release at the time: `v0.29.0` |\n\nTo re-sync after an upstream change: bump the relevant pinned commit in the\ntable above, replay the upstream diff against `src/bsl.grammar` and\n`src/index.ts` (styleTags), and add regression tests in `test/cases.txt`.\n\n## Limitations\n\nA handful of intentional simplifications, mostly to keep the LR grammar\nfree of ambiguity:\n\n- **Context-sensitive preprocessor identifiers.** `#Если`/`#Иначе`/\n  `#КонецЕсли`/`#Тогда`/`#И`/`#Или`/`#Не` reuse the corresponding BSL keyword\n  terms — styleTags discriminates them via parent selectors. The remaining\n  preprocessor-only words (`Область`, `КонецОбласти`, `Использовать`,\n  `native`, `Удаление`/`КонецУдаления`, `Вставка`/`КонецВставки`) are\n  specialized globally; if you use one as an ordinary identifier outside\n  `#` context, it will be tagged as a preprocessor token. BSL convention\n  does not collide with these names in practice.\n- **Comma-skipping in call arguments** (`Метод(a,,b)` or `Метод(,a)`) is\n  not supported — modelling `,` as a stand-alone item conflicts with inner\n  `f(g(...))` parsing in LR(1) without a custom external tokenizer. All\n  arguments must be non-empty expressions. Affects roughly 1–2% of\n  real-world BSL.\n- **Multiline strings cannot contain embedded preprocessor directives.**\n  ANTLR's `multilineString : STRINGSTART (STRINGPART | BAR | preprocessor)*\n  STRINGTAIL` accepts `#Если` inside a `|`-continued string; we match the\n  entire literal as one token. Very rare in practice.\n\nVerified against ~100 real-world configuration files\n(`1c-syntax/bsl-language-server` and `1c-syntax/vsc-language-1c-bsl`\nfixtures): **85% clean parses, 0 hard failures**, the remaining ~15% are\neither intentional ParseError test cases, source-level typos, or hit one\nof the three limitations above.\n\nOut of scope (defer to other tools):\n\n- IntelliSense / completion / hover — that belongs in\n  [`bsl-language-server`](https://github.com/1c-syntax/bsl-language-server).\n- Refactorings, diagnostics — same.\n\n## Build & test\n\n```bash\nnpm install\nnpm run build   # runs lezer-generator + rollup + tsc\nnpm test        # mocha against test/cases.txt fixtures\n```\n\nThe repo ships a public-npm `.npmrc` so contributors on networks that default\nto a private mirror (e.g. corporate Artifactory) still resolve packages from\n`https://registry.npmjs.org/`. Publishing requires a separate `npm login`\nagainst the public registry.\n\n## Demo\n\nThe hosted version at <https://1c-syntax.github.io/codemirror-lang-bsl/> is\ndeployed automatically by `.github/workflows/pages.yml` on every push to\n`main`. To build the demo locally:\n\n```bash\nnpm install\nnpm run lint          # ESLint (flat config) on src/, examples/, test/\nnpm run build         # main library → dist/\nnpm test              # mocha against test/cases.txt and overlay tests\nnpm run build:demo    # static demo → docs/{index.html,bundle.js}\nnpm run build:docs    # TypeDoc API reference → docs/api/\nnpm run build:site    # demo + docs (CI uses this for gh-pages)\n# serve docs/ via any HTTP server, e.g.\npython3 -m http.server -d docs 8080\n```\n\n`examples/demo.ts` is the source; `examples/index.html` is the HTML shell that\nthe rollup config copies into `docs/index.html` alongside the bundled\n`bundle.js`.\n\n## Publishing a release\n\nReleases are cut by publishing a GitHub Release with a tag of the form\n`v<version>` (matching `package.json#version`). The\n`.github/workflows/publish.yml` workflow builds, tests, and runs\n`npm publish --provenance --access public` against npmjs.org. Authentication\nis done via [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers)\n— no long-lived `NPM_TOKEN` secret is needed; npm exchanges the workflow's\nOIDC token for a short-lived credential at publish time.\n\n### Setup (one-time)\n\n1. <https://www.npmjs.com/package/@1c-syntax/codemirror-lang-bsl/access> →\n   *Trusted Publishers* → *Add*\n2. Provider: **GitHub Actions**\n3. Repository owner: `1c-syntax`, Repository: `codemirror-lang-bsl`\n4. Workflow file name: `publish.yml`\n5. Environment: `npm`\n\nThat's it — no secrets, no tokens. The workflow's `id-token: write`\npermission plus `--provenance` are enough; npm verifies the OIDC token\nagainst the configured trusted publisher and accepts the upload.\n\n### Cutting a release\n\n1. Bump `package.json#version`, commit, push.\n2. <https://github.com/1c-syntax/codemirror-lang-bsl/releases/new> →\n   tag `v<version>` (matching `package.json#version`) → *Publish release*.\n3. The `Publish to npm` workflow picks up the `release.published` event,\n   verifies tag-vs-version, builds, tests, and runs `npm publish`.\n\n### Dry-run before cutting\n\n`workflow_dispatch` on `Publish to npm` accepts a `dry_run` input. Run it\nto validate auth, build, and tarball contents without actually publishing.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","readmeFilename":"README.md"}