State: modelled. The module's own language service for IEC 61131-3 Structured Text with the TwinCAT and CODESYS extensions, checked on every Structured Text region of the real TwinCAT fixtures and fuzzed, Linux only. It never claims a program compiles: that is the vendor compiler's call (see Build with the vendor compiler).
In .st and .iecst files
These files open in the language Structured Text (id iecst):
- Colouring from the theme, multi-line comments included.
- Outline of POUs, types, variable sections and members.
- Completion of variables in scope, POUs, types, keywords, members after a dot (following
EXTENDS,THIS^,SUPER^) and named parameters in a call.qualified_onlyenumerations and global lists are offered only qualified. - Hover with the declaration line and its comment.
- Go to Definition and Find All References across the open files and the workspace's
.stfiles. - Rename across them. It refuses collisions, shadowing and names it cannot resolve.
- Structure checks in Problems as you type (below).
In TwinCAT object files
.TcPOU, .TcGVL, .TcDUT and .TcIO files open as XML with:
- an outline of the object, its methods, properties with their Get and Set bodies, and variables, at their positions in the file;
- the same structure checks on each declaration and body, reported at their exact place in the XML;
- an XML problem when the file is not well-formed.
Structure checks
Problems lists, as you type:
- unclosed comments, strings and pragmas;
- an
END_that matches nothing or the wrong opener; - blocks never closed;
- malformed literals and undefined escapes;
- characters that are not Structured Text.
The checks are lexical and structural only. Types, undeclared names and semantics are the vendor compiler's call. The lexer follows IEC 61131-3 third edition plus nested comments, {...} pragmas and ?=.
Not verified
- Anything the vendor compiler checks.
- Customer projects of realistic size; Windows.