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

Function is_string_concat

internal/cbm/lsp/java_lsp.c:1247–1260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1245}
1246
1247static bool is_string_concat(JavaLSPContext *ctx, TSNode node) {
1248 /* Either operand of type java.lang.String makes the whole expr a String. */
1249 TSNode lhs = ts_node_child_by_field_name(node, "left", 4);
1250 TSNode rhs = ts_node_child_by_field_name(node, "right", 5);
1251 const CBMType *l = java_eval_expr_type(ctx, lhs);
1252 const CBMType *r = java_eval_expr_type(ctx, rhs);
1253 if (l && l->kind == CBM_TYPE_NAMED &&
1254 strcmp(l->data.named.qualified_name, "java.lang.String") == 0)
1255 return true;
1256 if (r && r->kind == CBM_TYPE_NAMED &&
1257 strcmp(r->data.named.qualified_name, "java.lang.String") == 0)
1258 return true;
1259 return false;
1260}
1261
1262static const CBMType *eval_binary(JavaLSPContext *ctx, TSNode node) {
1263 /* Determine operator. tree-sitter-java exposes it as a child token. */

Callers 1

eval_binaryFunction · 0.85

Calls 1

java_eval_expr_typeFunction · 0.85

Tested by

no test coverage detected