MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / jv_kotlin_function

Function jv_kotlin_function

internal/cbm/doclink_jvm.c:2558–2583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2556}
2557
2558static void jv_kotlin_function(jv_scan_t *s, TSNode decl, const jv_frame_t *fr) {
2559 TSNode body = jv_child(decl, "function_body");
2560 const char *raw = NULL;
2561 size_t raw_len = 0;
2562 const char *name = jv_name_of(s, jv_child(decl, "simple_identifier"), &raw, &raw_len);
2563 if (!name || !jv_member_ok(s, decl, body, true, fr->inner_depth)) {
2564 return;
2565 }
2566 jv_member_seen(s, decl, body, true);
2567 uint32_t line = jv_line(decl);
2568 TSNode receiver = jv_field(decl, "receiver");
2569 TSNode tparams = jv_child(decl, "type_parameters");
2570 TSNode params = jv_child(decl, "function_value_parameters");
2571 const jv_def_t *def = jv_def_match(s, line, raw, raw_len, 'c');
2572 jv_member_open(s, line, 'c', "", fr, name);
2573 jv_put_tparams(s, tparams);
2574 jv_putc(&s->sb, '\t');
2575 jv_kotlin_put_sig(s, receiver, params, true);
2576 jv_putc(&s->sb, '\t');
2577 jv_kotlin_put_recv(s, receiver, tparams);
2578 jv_putc(&s->sb, '\t');
2579 jv_put_slot(s, def, jv_join(s, fr->path, name));
2580 jv_putc(&s->sb, '\t');
2581 jv_kotlin_put_pnames(s, params, "parameter");
2582 jv_putc(&s->sb, '\n');
2583}
2584
2585static void jv_kotlin_property(jv_scan_t *s, TSNode decl, const jv_frame_t *fr) {
2586 TSNode vd = jv_child(decl, "variable_declaration");

Callers 1

jv_kotlin_containerFunction · 0.85

Calls 15

jv_childFunction · 0.85
jv_name_ofFunction · 0.85
jv_member_okFunction · 0.85
jv_member_seenFunction · 0.85
jv_lineFunction · 0.85
jv_fieldFunction · 0.85
jv_def_matchFunction · 0.85
jv_member_openFunction · 0.85
jv_put_tparamsFunction · 0.85
jv_putcFunction · 0.85
jv_kotlin_put_sigFunction · 0.85
jv_kotlin_put_recvFunction · 0.85

Tested by

no test coverage detected