SQL: an `invocation` node's callee is nested object_reference > `name` field (the same shape as a create_function's name).
| 671 | // SQL: an `invocation` node's callee is nested object_reference > `name` field |
| 672 | // (the same shape as a create_function's name). |
| 673 | static char *extract_sql_callee(CBMArena *a, TSNode node, const char *source, const char *nk) { |
| 674 | if (strcmp(nk, "invocation") != 0) { |
| 675 | return NULL; |
| 676 | } |
| 677 | TSNode oref = cbm_find_child_by_kind(node, "object_reference"); |
| 678 | if (ts_node_is_null(oref)) { |
| 679 | return NULL; |
| 680 | } |
| 681 | TSNode nm = ts_node_child_by_field_name(oref, TS_FIELD("name")); |
| 682 | return ts_node_is_null(nm) ? NULL : cbm_node_text(a, nm, source); |
| 683 | } |
| 684 | |
| 685 | // COBOL: a `CALL 'HELPER'` is a call_statement whose `x` field is a string |
| 686 | // literal naming the called program; the callee is that string sans quotes. |
no test coverage detected