Skip to content

v0.3.1 — Real-world parse rate hits 92% / 100%

Latest

Choose a tag to compare

@nixel2007 nixel2007 released this 29 May 10:25
· 2 commits to main since this release

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 (Процедура Выполнить()).
    SubName now uses the same dotIdentifier rule that
    PropertyAccess/CallAccess already 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)+constValue now matches
    String+ for the same reason.
  • Comma-skipped arguments (Метод(a,,b), Метод(,a),
    Метод(a,), Метод(,)). Modelled after ANTLR's
    callParam : expression? — empty slots are real callArg nodes
    with no expression child. The with-expression alternative carries
    @dynamicPrecedence=1 so the GLR engine still resolves
    f(g(x)) as one nested call rather than f applied to g and
    (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 (via indentWithTab) 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-bsl

Full changelog: v0.3.0...v0.3.1