quakeforge/tools/qfcc/test/entity-field.r
Bill Currie 87b240f469 Use special treatment for .float ()foo; functions.
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.
2011-02-22 08:54:01 +09:00

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);
};