tree-sitter-kotlin
tree-sitter-kotlin copied to clipboard
Improve handling of receiver types
Fixes https://github.com/fwcd/tree-sitter-kotlin/issues/153 by using receiver_type.
- I'm not too familiar with grammar-writing, so I'm unsure if my fixes here are ideal.
function_typehas been updated to more closely match the official grammar for functionType.[$.receiver_type], [$.receiver_type, $._type],have been added to the conflicts list. Adding these conflict entries made previously error-generating Kotlin inputs non-error-generating with sensible parse trees. It's unclear if this is the best strategy for specifying the grammar.
Draft mode because this also includes changes from https://github.com/fwcd/tree-sitter-kotlin/pull/152.