Bug-fix and grammar-tightening release on top of v0.3.0. Headline:
vsc-language-1c-bsl real configuration fixtures now parse 100% clean
(up from 88%); bsl-language-server test fixtures move from 84% to
92%. The four remaining degraded files in the bsl-language-server set
are all intentionally malformed (*ParseError* tests, or source
typos like Неопределенно and Функция Пример3 written without
parentheses).
Grammar fixes
- Methods named after BSL keywords (
Процедура Выполнить()).
SubNamenow uses the samedotIdentifierrule that
PropertyAccess/CallAccessalready used, so a sub name that
globally specializes to a keyword still parses cleanly. Real
configuration code uses this freely; v0.3.0 errored out at the sub
declaration. - Implicit string concatenation by juxtaposition
(\"\" \"Выбрать\" \"Валюты.Код\"is one logical literal made of
three tokens). Mirrors ANTLR's
string : (STRING | multilineString)+—constValuenow matches
String+for the same reason. - Comma-skipped arguments (
Метод(a,,b),Метод(,a),
Метод(a,),Метод(,)). Modelled after ANTLR's
callParam : expression?— empty slots are realcallArgnodes
with noexpressionchild. The with-expression alternative carries
@dynamicPrecedence=1so the GLR engine still resolves
f(g(x))as one nested call rather thanfapplied togand
(x)separately. This was the previously documented Limitation
#2 and is now closed. - Multi-line strings with blank rows between
|-continued
segments. Configurations routinely split long queries across
paragraphs; the v0.3.0 regex required exactly one newline before each
|and errored on blank-line separators. The token now accepts a
run of newlines, matching ANTLR's token-stream
STRINGPART/STRINGTAIL approach.
Live demo
- Editor uses real tab characters at a 4-column display width.
Tab key inserts a tab (viaindentWithTab) instead of moving focus
out of the editor.
Numbers
| Sample set | v0.3.0 clean | v0.3.1 clean |
|---|---|---|
| bsl-language-server fixtures (50) | 84% | 92% |
| vsc-language-1c-bsl real config (17) | 88% | 100% |
| Hard failures | 0 | 0 |
Install
npm install @1c-syntax/codemirror-lang-bslFull changelog: v0.3.0...v0.3.1