mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Allow single-constant attribute values
I don't remember why I though requiring a parameter list was a good idea, but it makes working with attributes harder than it needs to be.
This commit is contained in:
parent
1117d31b30
commit
186a781121
1 changed files with 4 additions and 2 deletions
|
@ -43,11 +43,13 @@ ALLOC_STATE (attribute_t, attributes);
|
|||
attribute_t *
|
||||
new_attribute(const char *name, const expr_t *params)
|
||||
{
|
||||
if (params && params->type != ex_list) {
|
||||
if (params
|
||||
&& params->type != ex_list
|
||||
&& params->type != ex_value) {
|
||||
internal_error (params, "attribute params not a list");
|
||||
}
|
||||
bool err = false;
|
||||
if (params) {
|
||||
if (params && params->type == ex_list) {
|
||||
for (auto p = params->list.head; p; p = p->next) {
|
||||
auto e = p->expr;
|
||||
if (e->type == ex_expr) {
|
||||
|
|
Loading…
Reference in a new issue