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

1.9.0/1.9.1 SymbolProvider regressions #30

Closed msftrncs closed 3 years ago

msftrncs commented 3 years ago

With the 1.9.0/1.9.1 SymbolProvider changes:

  1. may take excessive time for malformed comments/quoted strings in a VAR(_x) block
  2. fails to mark CONSTANT variables
  3. may show nonexistent '' variables from final comments or from comments separated from previous variable by two line breaks.

I will post a PR shortly.

With issue 1 under control, I was able to open a 32,000 line CoDeSys EXP file, and have a presentation of the approximately 4,000 symbols in under 2 seconds.

msftrncs commented 3 years ago

Side issue I haven't solved yet, a missing END_VAR between two VAR's, causes the VAR keyword to be included as a variable in the previous VAR.

VAR
    hello : SumType;
(* END_VAR oops *)
VAR    (* <-- taken as a variable name with type SumType2 *)
    hello2 : SumType2;   (* hello2 variable will not appear in symbol list *)
END_VAR
Serhioromano commented 3 years ago

Should this one be closed already?

msftrncs commented 3 years ago

Yes, closed by #32 being merged. (I didn't use the keyword 'fixes' when I mentioned issue)