DanielGavin / ols

Language server for Odin
MIT License
382 stars 58 forks source link

Wrong semantic tokens in proc type params without names #293

Closed thetarnav closed 4 months ago

thetarnav commented 6 months ago

Seems like semantic tokens don't expect a procedure to not have parameter names, but that is a valid syntax when defining a proc type.

Func :: proc (u32, int, string)

With semantic tokens:

image

Without:

image

The first letter has a token of parameter instead of support.type or entity.name.type.

thetarnav commented 4 months ago

Sometimes similar thing happens to multiple unnamed return values. This is from odin/core/os/os_linux.odin image

DanielGavin commented 4 months ago

Should be fixed. It's caused by core:odin/parser apparently sets the name to be "_" when the parameters names are empty. I now handle that.