- scriptified ArtiHealingRadius.

- allow switch/case with names.
- fixed break jump target handling for switch/case. This only worked when the break was in the outermost compound statement, those in inner ones were missed.
This commit is contained in:
Christoph Oelckers 2016-11-27 00:18:07 +01:00
commit 69d4d36429
9 changed files with 151 additions and 120 deletions

View file

@ -72,6 +72,7 @@ typedef TDeletingArray<FxExpression*> FArgumentList;
struct FCompileContext
{
FxExpression *ControlStmt = nullptr;
FxLoopStatement *Loop = nullptr;
FxCompoundStatement *Block = nullptr;
PPrototype *ReturnProto;
@ -1656,6 +1657,8 @@ class FxSwitchStatement : public FxExpression
TArray<CaseAddr> CaseAddresses;
public:
TArray<FxJumpStatement *> Breaks;
FxSwitchStatement(FxExpression *cond, FArgumentList &content, const FScriptPosition &pos);
~FxSwitchStatement();
FxExpression *Resolve(FCompileContext&);