- for (j = 0; j < e->items->count; ++j) {
- decl_enum_item *i = e->items->list[j];
-
- if (!i->num) {
- if (j) {
- i->inc.t = PSI_T_NUMBER;
- i->inc.u.numb = "1";
- i->inc.operator = PSI_T_PLUS;
- i->inc.operand = i->prev->num ?: &i->prev->inc;
- i->num = &i->inc;
- } else {
- i->inc.t = PSI_T_NUMBER;
- i->inc.u.numb = "0";
- i->num = &i->inc;
- }
- }
- if (!validate_num_exp(data, i->num, NULL, NULL, e)) {
- return 0;
+ for (seq = 0; psi_plist_get(e->items, seq, &i); ++seq) {
+ i->prev = p;
+ if (!psi_decl_enum_item_validate(data, e, i, seq)) {
+ return false;