Skip to content

Commit

Permalink
Merge branch 'release/1.12.14'
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhioromano committed Oct 20, 2022
2 parents 39e2d72 + 814bbc1 commit 87d82e2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

All notable changes to the "st" extension will be documented in this file.

## [1.12.13] - 2022-10-18
## [1.12.14] - 2022-10-18

- fix - highlight of names with `_TO_` in it
- fix - comment in comment highlight
- fix - capitalization of s,h,m in `T#***`

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ Utilize VS Code Formatter API. Use general formatting command short keys. It cap
- add - `(END_?)CONST`, `(END_?)ORGANIZATION_BLOCK`, `(END_?)DATA_BLOCK`, `(END_?)LABEL`, `BEGIN`, `COUNTER`, `VOID`, `NIL` and `GOTO` keywords
- add - support for `PQ` and `PI` in constants like `%PQW10.0`.

### 1.11.13
### 1.11.14

- fix - highlight of names with `_TO_` in it
- fix - comment in comment highlight
- fix - capitalization of s,h,m in `T#***`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vscode-st",
"displayName": "Structured Text language Support",
"description": "Supports for syntax highlights, snippets for IEC 61131-3 Structured Text",
"version": "1.12.13",
"version": "1.12.14",
"publisher": "Serhioromano",
"sponsor": {
"url": "https://www.paypal.com/donate/?hosted_button_id=UTU4EMPLLLX54"
Expand Down
22 changes: 11 additions & 11 deletions syntaxes/st.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
{
"include": "#strings"
},
{
"include": "#operators"
},
{
"include": "#functions"
},
Expand Down Expand Up @@ -181,11 +184,11 @@
},
{
"name": "keyword.operator.arithmetic.st",
"match": "(?:\\+|\\-|\\/|\\*)"
"match": "(?:\\+|\\-|\\/|\\*|MOD)"
},
{
"name": "keyword.operator.arithmetic.st",
"match": "\\b(?:ABS|SIN|MOD|ABS|ACOS|ASIN|ATAN|COS|EXP|EXPT|LN|LOG|SIN|SQRT|TAN|SEL|MUX|SHL|SHR|ROL|ROR|ADD|DIV|MUL|SUB|LIMIT|MAX|MIN|ADR(INST)?|SIZE(OF)?|BIT_?ADR|TRUNC(_INT)?)\\b"
"match": "\\b(?:ABS|SIN|ABS|ACOS|ASIN|ATAN|COS|EXP|EXPT|LN|LOG|SIN|SQRT|TAN|SEL|MUX|SHL|SHR|ROL|ROR|ADD|DIV|MUL|SUB|MAX|MIN|ADR(INST)?|SIZE(OF)?|BIT_?ADR|TRUNC(_INT)?)(?=\\()"
},
{
"name": "keyword.operator.arithmetic.st",
Expand All @@ -201,15 +204,11 @@
"patterns": [
{
"name": "support.function.st",
"match": "\\b[A-Za-z_]+(_TO_)[A-Za-z_]+\\b"
"match": "\\b[A-Za-z_]*(_TO_|TO_|FROM_|TRUNC_)[A-Za-z_]+(?=\\()"
},
{
"name": "support.function.st",
"match": "\\b(TO_|FROM_|TRUNC_)[A-Za-z_]+\\b"
},
{
"name": "support.function.st",
"match": "\\b(?:RS|SR|TON|TP|TOF|TRUNC|CTD|CTU|CTUD|R_TRIG|F_TRIG|MOVE|CONCAT|DELETE|FIND|INSERT|LEFT|LEN|REPLACE|RIGHT|RTC|MID|SEMA|ROUND|FLOOR|CEIL|UNPACK|REF)\\b"
"match": "\\b(?:TRUNC|MOVE|CONCAT|LIMIT|DELETE|FIND|INSERT|LEFT|LEN|REPLACE|RIGHT|RTC|MID|SEMA|ROUND|FLOOR|CEIL|UNPACK|REF)(?=\\()"
},
{
"begin": "([a-zA-Z_0-9]+)(\\()",
Expand Down Expand Up @@ -289,9 +288,6 @@
{
"include": "#controls"
},
{
"include": "#operators"
},
{
"name": "keyword.other.storage.st",
"match": "\\b(POINTER TO|POINTER|REF(ERENCE)?|REF_TO|OVERLAP|USING|FROM)\\b"
Expand All @@ -300,6 +296,10 @@
"name": "storage.type.class.st",
"match": "\\b(END_)?(PROGRAM|CONFIGURATION|TCP|RESOURCE|CHANNEL|LIBRARY|FOLDER|BINARIES|INCLUDES|SOURCES|ACTION|STEP|INITIAL_STEP|TRANSITION|TYPE|FUNCTION|FUNCTION_BLOCK|NAMESPACE|IMPLEMENTATION|INTERFACE|PROPERTY|METHOD|CONST|ORGANIZATION_BLOCK|DATA_BLOCK|LABEL)\\b"
},
{
"name": "storage.type.class.st",
"match": "\\b(RS|SR|TON|TP|TOF|CTD|CTU|CTUD|R_TRIG|F_TRIG)\\b"
},
{
"name": "punctuation.terminator.statement.st",
"match": "[;]"
Expand Down
3 changes: 3 additions & 0 deletions test.iecst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ END_VAR
FUNCTION_BLOCK FB_TEST
VAR
iNum: WORD;

END_VAR
TEST_ARR[iNum] := 10;
END_FUNCTION_BLOCK
Expand All @@ -24,6 +25,8 @@ PROGRAM PLC_PRG
END_PROGRAM

CONST
MY_TON_D := 2;
MY_TO_D := 2;
LIMIT := 7;
END_CONST

Expand Down

0 comments on commit 87d82e2

Please sign in to comment.