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

Function annotation_args_node

internal/cbm/extract_defs.c:3400–3414  ·  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

3398 * under a `constructor_invocation` child as a `value_arguments` node rather than
3399 * the `arguments` field / `argument_list` child that Java exposes. */
3400static TSNode annotation_args_node(TSNode annotation) {
3401 TSNode args = ts_node_child_by_field_name(annotation, TS_FIELD("arguments"));
3402 if (!ts_node_is_null(args)) {
3403 return args;
3404 }
3405 args = find_decorator_args(annotation);
3406 if (!ts_node_is_null(args)) {
3407 return args;
3408 }
3409 TSNode ci = cbm_find_child_by_kind(annotation, "constructor_invocation");
3410 if (!ts_node_is_null(ci)) {
3411 return cbm_find_child_by_kind(ci, "value_arguments");
3412 }
3413 return args;
3414}
3415
3416/* Try to extract a route from a Java/JVM/Kotlin annotation node (`annotation` or
3417 * `marker_annotation`). Spring mapping annotations carry the HTTP method in the

Callers 2

scan_route_annotationsFunction · 0.85

Calls 2

find_decorator_argsFunction · 0.85
cbm_find_child_by_kindFunction · 0.85

Tested by

no test coverage detected