emacs-vs / codemetrics

Plugin shows complexity information
GNU General Public License v3.0
66 stars 7 forks source link

Fixing Kotlin recursion not registering properly #11

Closed themkat closed 7 months ago

themkat commented 7 months ago

It seems like Kotlin recursion is not handled properly. This is because of the grammar using the node name simple_identifier instead of identifier like most grammars do.

jump_expression included returns as well, so changed it to explicit break and continues for now. ~Might have to look further into it later, but we will see.~ EDIT: Added tests right away, because why wait 😛

Thanks to having a test harness, I could work in a TDD-ish way this time 😄 Also added a test for Java to verify the general recursion case.

jcs090218 commented 7 months ago

Thank you for your hard work!