Skip to content

Commit 626802b

Browse files
committed
fix: clang-format violations in extract_defs.c
Wrap two if-conditions that exceeded the 100-column limit: - Line 3506: break &&-condition before the parenthesised ObjC/Java language check so the line stays within 100 cols. - Lines 5860-5861: split the combined enum_body / enum_body_declarations comparison onto separate continuation lines to satisfy the limit. No logic change; formatting only. Signed-off-by: sahil-mangla <manglasahil2017@gmail.com>
1 parent 6ab8a84 commit 626802b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

internal/cbm/extract_defs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,7 +3503,8 @@ static void extract_class_def(CBMExtractCtx *ctx, TSNode node, const CBMLangSpec
35033503

35043504
TSNode name_node = ts_node_child_by_field_name(node, TS_FIELD("name"));
35053505
// ObjC/Java: class name is first identifier child (Java fallback for enum_declaration)
3506-
if (ts_node_is_null(name_node) && (ctx->language == CBM_LANG_OBJC || ctx->language == CBM_LANG_JAVA)) {
3506+
if (ts_node_is_null(name_node) &&
3507+
(ctx->language == CBM_LANG_OBJC || ctx->language == CBM_LANG_JAVA)) {
35073508
name_node = cbm_find_child_by_kind(node, "identifier");
35083509
}
35093510

@@ -5858,7 +5859,8 @@ static void push_class_body_children(TSNode node, const CBMLangSpec *spec, wd_st
58585859
if (strcmp(ck, "field_declaration_list") == 0 || strcmp(ck, "class_body") == 0 ||
58595860
strcmp(ck, "declaration_list") == 0 || strcmp(ck, "body") == 0 ||
58605861
strcmp(ck, "block") == 0 || strcmp(ck, "suite") == 0 ||
5861-
strcmp(ck, "enum_body") == 0 || strcmp(ck, "enum_body_declarations") == 0 ||
5862+
strcmp(ck, "enum_body") == 0 ||
5863+
strcmp(ck, "enum_body_declarations") == 0 ||
58625864
// Groovy class bodies are a `closure` node; routing through the
58635865
// nested-class path keeps methods from being re-walked (and thus
58645866
// double-extracted) as top-level functions. Gated to Groovy so other

0 commit comments

Comments
 (0)