japhib / pico8-ls

PICO-8 Language Server
MIT License
64 stars 8 forks source link

Labels are marked undefined unless defined before goto #32

Closed mika76 closed 1 year ago

mika76 commented 1 year ago

I see in #16 there was a fix for labels, but it seems to work only if the label is defined before the goto, if for eg you want to jump out of a couple of loops to a label below it is still marked as undefined (but works fine in pico-8)

Screenshot 2022-11-30 at 08 02 35

japhib commented 1 year ago

That makes sense, I think when checking gotos it just naively looks for labels defined before it only. This should probably be a quick fix.

japhib commented 1 year ago

Fix released just now with 0.4.10