add operand count for expression opcodes

This commit is contained in:
Nikita Smith
2025-10-02 18:19:42 -07:00
parent 569481c779
commit da74b8595c
2 changed files with 195 additions and 178 deletions
+15
View File
@@ -386,6 +386,21 @@ dw_pick_default_lower_bound(DW_Language lang)
return lower_bound;
}
internal U64
dw_operand_count_from_expr_op(DW_ExprOp op)
{
switch (op) {
#define X(_N, _ID, _OPER_COUNT) case _ID: return _OPER_COUNT;
DW_Expr_V3_XList(X)
DW_Expr_V4_XList(X)
DW_Expr_V5_XList(X)
DW_Expr_GNU_XList(X)
#undef X
default: { NotImplemented; } break;
}
return 0;
}
////////////////////////////////
//~ rjf: String <=> Enum