mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
87b240f469
The parser wants to treat .float () foo; as a function returning a float field, but qcc treats it as a field holding a function variable. Fortuantely, field types are always "simple" (ie, at worst, just more field type wrappers around the non-field type), so all that's needed to obtain qcc grammar is to reach into the field type layers and do the function type calculation based on the non-field type found there.
9 lines
124 B
R
9 lines
124 B
R
.float x;
|
|
.vector v;
|
|
.void (float y) func;
|
|
|
|
void (entity ent) foo =
|
|
{
|
|
ent.x = ent.v * ent.v;
|
|
ent.func (ent.v * ent.v);
|
|
};
|