Closed bomgar closed 7 months ago
Thank you. I noticed that the curly brace around the when
body are not included. However, they are in the hierarchy above the when_subject
, so the when_subject
would be highlighted one level below the body, even though optically they are on the same level and the subject comes before the body. That's just weird.
How about this pattern instead?
(when_expression
subject: (when_subject
"(" @delimiter
")" @delimiter)
"{" @delimiter
"}" @delimiter @sentinel) @container
This would highlight both sets of delimiters at the same level. Does this make sense in Kotlin, or are there other cases where this would look wrong?
I think that makes sense. You want me to open another PR?
I totally forgot about that one:
when {
1 == 1 -> print("1")
else -> print("not")
}
It's OK, I have done it myself. I just needed confirmation from someone who knows Kotlin better.
add kotlin support