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

Function annotation_args_node

internal/cbm/extract_defs.c:1566–1580  ·  view source on GitHub ↗

Resolve an annotation's argument list across grammars. Kotlin keeps the args * under a `constructor_invocation` child as a `value_arguments` node rather than * the `arguments` field / `argument_list` child that Java exposes. */

Source from the content-addressed store, hash-verified

1564 * under a `constructor_invocation` child as a `value_arguments` node rather than
1565 * the `arguments` field / `argument_list` child that Java exposes. */
1566static TSNode annotation_args_node(TSNode annotation) {
1567 TSNode args = ts_node_child_by_field_name(annotation, TS_FIELD("arguments"));
1568 if (!ts_node_is_null(args)) {
1569 return args;
1570 }
1571 args = find_decorator_args(annotation);
1572 if (!ts_node_is_null(args)) {
1573 return args;
1574 }
1575 TSNode ci = cbm_find_child_by_kind(annotation, "constructor_invocation");
1576 if (!ts_node_is_null(ci)) {
1577 return cbm_find_child_by_kind(ci, "value_arguments");
1578 }
1579 return args;
1580}
1581
1582/* Try to extract a route from a Java/JVM/Kotlin annotation node (`annotation` or
1583 * `marker_annotation`). Spring mapping annotations carry the HTTP method in the

Callers 1

Calls 2

find_decorator_argsFunction · 0.85
cbm_find_child_by_kindFunction · 0.85

Tested by

no test coverage detected