tree-sitter-kotlin
tree-sitter-kotlin copied to clipboard
Support backtick'ed function names
Kotlin has special syntax defined for Java interoperability where e.g. function names can be defined to be more or less anything delimited by backticks, e.g. (source: https://stackoverflow.com/a/65923081/51634):
fun `adding 3 and 4 should be equal to 7`() {
assertEquals(calculator.add(3, 4), 7)
}
The documentation for this feature seems to be here:
- https://kotlinlang.org/docs/java-interop.html#escaping-for-java-identifiers-that-are-keywords-in-kotlin
- https://kotlinlang.org/docs/coding-conventions.html#names-for-test-methods
Notice that this feature is common for test functions. As such, I hope it could be possible to add support for it in the tree-sitter grammar.