Add min and max to DECORATE
This commit is contained in:
parent
a8e985f4f6
commit
1ffb7ad109
6 changed files with 248 additions and 12 deletions
|
|
@ -349,6 +349,21 @@ static FxExpression *ParseExpression0 (FScanner &sc, PClassActor *cls)
|
|||
// a cheap way to get them working when people use "name" instead of 'name'.
|
||||
return new FxConstant(FName(sc.String), scpos);
|
||||
}
|
||||
else if (sc.CheckToken(TK_Min) || sc.CheckToken(TK_Max))
|
||||
{
|
||||
int type = sc.TokenType;
|
||||
TArray<FxExpression*> list;
|
||||
sc.MustGetToken('(');
|
||||
for (;;)
|
||||
{
|
||||
FxExpression *expr = ParseExpressionM(sc, cls);
|
||||
list.Push(expr);
|
||||
if (sc.CheckToken(')'))
|
||||
break;
|
||||
sc.MustGetToken(',');
|
||||
}
|
||||
return new FxMinMax(list, type, sc);
|
||||
}
|
||||
else if (sc.CheckToken(TK_Random))
|
||||
{
|
||||
FRandom *rng;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue