mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 23:32:04 +00:00
Parse statements as expressions in sequences
This will be needed for assignment operators to work
This commit is contained in:
parent
ab837b608d
commit
078881a941
1 changed files with 7 additions and 4 deletions
|
@ -539,7 +539,8 @@ static FxExpression *ParseFor(FScanner &sc, FState state, FString statestring, B
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
if (!sc.Compare(";"))
|
if (!sc.Compare(";"))
|
||||||
{
|
{
|
||||||
init = ParseAction(sc, state, statestring, bag); // That's all DECORATE can handle for now.
|
sc.UnGet();
|
||||||
|
init = ParseExpression(sc, bag.Info);
|
||||||
sc.MustGetStringName(";");
|
sc.MustGetStringName(";");
|
||||||
}
|
}
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
|
@ -552,7 +553,8 @@ static FxExpression *ParseFor(FScanner &sc, FState state, FString statestring, B
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
if (!sc.Compare(")"))
|
if (!sc.Compare(")"))
|
||||||
{
|
{
|
||||||
iter = ParseAction(sc, state, statestring, bag);
|
sc.UnGet();
|
||||||
|
iter = ParseExpression(sc, bag.Info);
|
||||||
sc.MustGetStringName(")");
|
sc.MustGetStringName(")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,8 +643,9 @@ FxExpression *ParseActions(FScanner &sc, FState state, FString statestring, Bagg
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // Handle a regular action function call
|
{ // Handle a regular expression
|
||||||
add = ParseAction(sc, state, statestring, bag);
|
sc.UnGet();
|
||||||
|
add = ParseExpression(sc, bag.Info);
|
||||||
sc.MustGetStringName(";");
|
sc.MustGetStringName(";");
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue