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

Function eval_ternary

internal/cbm/lsp/java_lsp.c:1238–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236}
1237
1238static const CBMType *eval_ternary(JavaLSPContext *ctx, TSNode node) {
1239 TSNode then_n = ts_node_child_by_field_name(node, "consequence", 11);
1240 TSNode else_n = ts_node_child_by_field_name(node, "alternative", 11);
1241 const CBMType *t = java_eval_expr_type(ctx, then_n);
1242 if (t && !cbm_type_is_unknown(t))
1243 return t;
1244 return java_eval_expr_type(ctx, else_n);
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. */

Callers 1

java_eval_expr_typeFunction · 0.85

Calls 2

java_eval_expr_typeFunction · 0.85
cbm_type_is_unknownFunction · 0.85

Tested by

no test coverage detected