Serhioromano / vscode-st

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

Nested comment and Syntax highlighting /coloring. #49

Closed Ekristoffe closed 1 year ago

Ekristoffe commented 1 year ago

Hello, I have found if there is nested comment like:

(*
        bAddress                : BYTE;
        bLength             : BYTE; (* size of the data *)
        dwID                : DWORD; (* 32 bit long ID *)
*)

because of the first *), the rest of the commented code won't be seen as commented. Could it be possible to fix this ? Thanks Edit: add image for better understanding: image

github-actions[bot] commented 1 year ago

Welcome!

Thank you for finding time to write an issue and make this extension better. I`ll appreciate if you find some time to rate this extension here.

I`ll get back to your ASAP.

Serhioromano commented 1 year ago

Perhaps there is a method but in Codesys it works the same. And in VS code in any other language comments like /* also works the same. So, I think it is how it supposed to work.

Ekristoffe commented 1 year ago

I am sorry but in codesys 2.3 or 3.5 it work as intended. Meaning each ( is considered as a level and the first ) doesn’t cancel all other comment level. If you want I can make more screen capture of codesys 2.3 and 3.5 vanilla settings … And yes this is a problem for codesys vanilla users. I haven’t tried to use multi level / / in vs code yet… I will try when back at home.

Serhioromano commented 1 year ago

Looks like I have fixed it in 1.12.13 version. Please try it. And if you like it, please rate the extension.

Ekristoffe commented 1 year ago

Thanks a lot, it work fine. and I already reviewed it (But using different account).