DECORATE can now handle jump statements
break and continue were added but are not yet useable anywhere This was made general enough so that loops and switch statements that accept breaks/continues can be done without much difficulty as well as goto statements with explicit labels if those are ever wanted
This commit is contained in:
parent
dfed6ac1fb
commit
c4eafc1c38
3 changed files with 121 additions and 22 deletions
|
|
@ -529,6 +529,18 @@ FxExpression *ParseActions(FScanner &sc, FState state, FString statestring, Bagg
|
|||
sc.MustGetString();
|
||||
add = new FxReturnStatement(retexp, sc);
|
||||
}
|
||||
else if (sc.Compare("break"))
|
||||
{
|
||||
add = new FxJumpStatement(TK_Break, sc);
|
||||
sc.MustGetStringName(";");
|
||||
sc.MustGetString();
|
||||
}
|
||||
else if (sc.Compare("continue"))
|
||||
{
|
||||
add = new FxJumpStatement(TK_Continue, sc);
|
||||
sc.MustGetStringName(";");
|
||||
sc.MustGetString();
|
||||
}
|
||||
else
|
||||
{ // Handle a regular action function call
|
||||
add = ParseAction(sc, state, statestring, bag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue