| 3908 | } |
| 3909 | |
| 3910 | static bool is_callable_reference_value(CBMLanguage language, TSNode node) { |
| 3911 | const char *kind = ts_node_type(node); |
| 3912 | if (language == CBM_LANG_JAVA && strcmp(kind, "method_reference") == 0) { |
| 3913 | return true; |
| 3914 | } |
| 3915 | if (language == CBM_LANG_KOTLIN && strcmp(kind, "callable_reference") == 0) { |
| 3916 | // `Type::class` shares the callable-reference grammar node but denotes |
| 3917 | // a class literal, not a reference to executable code. |
| 3918 | return !node_has_token(node, "class"); |
| 3919 | } |
| 3920 | return language == CBM_LANG_PHP && php_is_first_class_callable(node); |
| 3921 | } |
| 3922 | |
| 3923 | static TSNode first_present_field(TSNode node, const char *const *fields) { |
| 3924 | for (const char *const *field = fields; *field; field++) { |
no test coverage detected