jonnyboyC / kos-language-server

A language server for the Kerboscript (kOS) a language for Kerbal Space Program
MIT License
27 stars 6 forks source link

[BUG] Declare and Set chains not recognized #205

Open NCGThompson opened 1 year ago

NCGThompson commented 1 year ago

Describe the bug Declare and Set statements can be chained with commas in kOS, but the language server makes them as errors.

To Reproduce Steps to reproduce the behavior: In a script, write something like set a to 5, b to 6. or local a to 5, b to 6. The language server will mark that as an error: Expected ".". The script will, however run successfully in game as if it said set a to 5. set b to 6. or local a to 5. local b to 6.

Expected behavior The parser should evaluate chained Declare and Set statements in a similar way to as if they were separate.

Screenshots If applicable, add screenshots to help explain your problem.

Editor (please complete the following information):

Additional context The server already correctly recognizes Parameter chains. On the other hand, kOS doesn't accept Lock chains or Unset chains, so the server's behavior relating to them is correct.

Even though there is a good example for Parameter, I don't really understand parsers, so someone else will probably have to fix it.