nishtahir / language-kotlin

Textmate language grammar for the Kotlin programming language
Apache License 2.0
12 stars 6 forks source link

Syntax highlighting still slightly buggy #6

Closed morrisseyai closed 4 years ago

morrisseyai commented 5 years ago

Seems there's still a minor issue with the syntax highlighting, despite last week's fix.

If you take a look at, for example, this file & line: https://github.com/Maxr1998/ModernAndroidPreferences/blob/bae79242d6d05d0889a0c9b4827cc5cc0488039c/library/src/main/java/de/Maxr1998/modernpreferences/Preferences.kt#L172

Where we see references to clickListener? or attachedScreen?, it seems to be highlighting the everything after the first word. So in clickListener? we see Listener? is highlighted, and attachedScreen? we see Screen? is highlighted. This seems to also be true for further words after the first one. For example, if we were referencing oneTwoThreeFour? we'd see the TwoThreeFour? part highlighted.

Sorry this is a bit of a vague issue report... I hope this is enough information to work with.

nishtahir commented 5 years ago

Thanks for raising this. I think it's trying to match the second word as a type there because of the ?. I'll look into fixing it.

Zhuinden commented 5 years ago

I also ran into something odd, namely

https://github.com/Zhuinden/AndroidDiceGame/blob/4a385663927c6e2ed1c84ef70818724b54a59285/app/src/main/java/com/zhuinden/androiddicegame/DiceGame.kt#L133

this linked line and the lines below it all stop having the keywords highlighted, but I don't really see why.