Serhioromano / vscode-st

Extension for VS Code to support Structured Text language.
https://marketplace.visualstudio.com/items?itemName=Serhioromano.vscode-st#overview
MIT License
143 stars 28 forks source link

missing data type [WORD] or is it [WORLD]? #9

Closed msftrncs closed 5 years ago

msftrncs commented 5 years ago

The data type WORD and its relatives are not scoping/coloring.

I noticed in the tmLanguage file that instead WORLD appears. Maybe your ST variant supports some kind of WORLD type I am not aware of, so I have included a REGEX for it here:

\b(BOOL|BYTE|(?:D|L)?WORL?D|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|(?:POINTER|REF)\\sTO|ANY)\b

If you did not intend WORLD as a type, remove the L? in WORL?D. :)

I also included any number of white space between POINTER or REF and the TO. I also included TOD and DT because CoDeSys supports those as aliases to TIME_OF_DAY and DATE_AND_TIME respectively.

Serhioromano commented 5 years ago

Thank you. WORLD was a misspell.