mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Fix #1381
This commit is contained in:
@@ -5362,6 +5362,15 @@ isize calc_decl_count(Ast *decl) {
|
|||||||
count += calc_decl_count(decl->BlockStmt.stmts.data[i]);
|
count += calc_decl_count(decl->BlockStmt.stmts.data[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Ast_WhenStmt:
|
||||||
|
{
|
||||||
|
isize inner_count = calc_decl_count(decl->WhenStmt.body);
|
||||||
|
if (decl->WhenStmt.else_stmt) {
|
||||||
|
inner_count = gb_max(inner_count, calc_decl_count(decl->WhenStmt.else_stmt));
|
||||||
|
}
|
||||||
|
count += inner_count;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case Ast_ValueDecl:
|
case Ast_ValueDecl:
|
||||||
count = decl->ValueDecl.names.count;
|
count = decl->ValueDecl.names.count;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user