Add &ordered attribute for tables/sets

This commit is contained in:
Tim Wojtulewicz 2022-10-11 13:35:30 -07:00
parent e3682a09e0
commit bd7df9e2bf
9 changed files with 56 additions and 6 deletions

View file

@ -40,6 +40,7 @@ const char* attr_name(AttrTag t)
"&deprecated",
"&is_assigned",
"&is_used",
"&ordered",
};
return attr_names[int(t)];
@ -624,6 +625,11 @@ void Attributes::CheckAttr(Attr* a)
break;
}
case ATTR_ORDERED:
if ( type->Tag() != TYPE_TABLE )
Error("&ordered only applicable to tables");
break;
default:
BadTag("Attributes::CheckAttr", attr_name(a->Tag()));
}