SpontanCombust / witcherscript-ide

Language Server implementation for WitcherScript - Witcher 3's scripting language.
https://spontancombust.github.io/witcherscript-ide/
Apache License 2.0
10 stars 0 forks source link

[BUG] Broken syntax highlighting after some comments #29

Open SpontanCombust opened 2 months ago

SpontanCombust commented 2 months ago

Some keywords break syntax highlighting when being at the end of a single line comment.

How to reproduce:

  1. Start writing a single line comment with //
  2. At the end of the comment write one of the following: var, autobind, hint or default. Don't write anything after that.
  3. After this some portion of code after the comment should appear to be highlighted like a variable
SpontanCombust commented 2 months ago

The bug can be observed in 1.21 version of types.ws after line 1144

SpontanCombust commented 2 months ago

Regex that can be used to find bug cases: //.*(var|autobind|default|hint)$