Change objc_class_name to objc_name with objc_is_class_method

This commit is contained in:
gingerBill
2022-02-14 17:31:55 +00:00
parent e69738c079
commit 03aec70287
18 changed files with 166 additions and 172 deletions
+4 -8
View File
@@ -3059,16 +3059,12 @@ DECL_ATTRIBUTE_PROC(proc_decl_attribute) {
error(elem, "Expected a string value for '%.*s'", LIT(name));
}
return true;
} else if (name == "objc_class_name") {
} else if (name == "objc_is_class_method") {
ExactValue ev = check_decl_attribute_value(c, value);
if (ev.kind == ExactValue_String) {
if (string_is_valid_identifier(ev.value_string)) {
ac->objc_class_name = ev.value_string;
} else {
error(elem, "Invalid identifier for '%.*s', got '%.*s'", LIT(name), LIT(ev.value_string));
}
if (ev.kind == ExactValue_Bool) {
ac->objc_is_class_method = ev.value_bool;
} else {
error(elem, "Expected a string value for '%.*s'", LIT(name));
error(elem, "Expected a boolean value for '%.*s'", LIT(name));
}
return true;
} else if (name == "objc_type") {