Skip to content

feat(editor): add Structured Text (IEC 61131-3) language support - #914

Merged
antonreshetov merged 2 commits into
massCodeIO:mainfrom
kaftanati:feat/structured-text
Sep 4, 2026
Merged

antonreshetov merged 2 commits into
massCodeIO:mainfrom
kaftanati:feat/structured-text

Conversation

@kaftanati

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Other, please describe:

Adds Structured Text (IEC 61131-3) to the editor language selector using the st language ID. Previously, Structured Text had no dedicated syntax highlighting and the legacy st mapping fell back to plain text.

The TextMate grammar highlights declarations, control flow, types, operators, PLC addresses, numeric and date/time literals, strings with dollar escapes, and nested block and line comments. The legacy mapping now preserves st.

Validations

  • Follow our CONTRIBUTING guide
  • 26 tests passed using the editor's TextMate engine: node node_modules/vitest/vitest.mjs run src/renderer/components/editor/grammars/__tests__/structuredText.test.ts.
  • ESLint passed for the four changed files; git diff --check and commitlint passed.
  • Electron UI was not launched; validation covers language registration and tokenization.

Literal syntax references: numeric literals, duration literals, string literals.

@antonreshetov
antonreshetov self-requested a review September 4, 2026 11:06
Comment thread src/renderer/components/editor/grammars/__tests__/structuredText.test.ts Outdated
@antonreshetov
antonreshetov merged commit cd11cc4 into massCodeIO:main Sep 4, 2026
@kaftanati
kaftanati deleted the feat/structured-text branch September 4, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants