mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
Reorder pick parsing to require one parameter.
- This function is pointless without any parameters, so don't allow that.
This commit is contained in:
parent
549ba3d817
commit
2b323d01ed
1 changed files with 4 additions and 6 deletions
|
@ -390,16 +390,14 @@ static FxExpression *ParseExpression0 (FScanner &sc, const PClass *cls)
|
||||||
}
|
}
|
||||||
sc.MustGetToken('(');
|
sc.MustGetToken('(');
|
||||||
|
|
||||||
while (!(sc.CheckToken(')')))
|
for (;;)
|
||||||
{
|
{
|
||||||
FxExpression *min = ParseExpressionM(sc, cls);
|
FxExpression *expr = ParseExpressionM(sc, cls);
|
||||||
list.Push(min);
|
list.Push(expr);
|
||||||
if (sc.CheckToken(')'))
|
if (sc.CheckToken(')'))
|
||||||
break;
|
break;
|
||||||
else
|
sc.MustGetToken(',');
|
||||||
sc.MustGetToken(',');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new FxPick(rng, list, sc);
|
return new FxPick(rng, list, sc);
|
||||||
}
|
}
|
||||||
else if (sc.CheckToken(TK_FRandom))
|
else if (sc.CheckToken(TK_FRandom))
|
||||||
|
|
Loading…
Reference in a new issue