mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-30 15:31:30 +02:00
Add back some enclosing scope-exit information to the frontend to produce
proper error messages inside switch statements.
This commit is contained in:
@@ -469,6 +469,9 @@ struct SwitchStatement : Statement
|
||||
Array gotoCases; // array of unresolved GotoCaseStatement's
|
||||
Array *cases; // array of CaseStatement's
|
||||
int hasNoDefault; // !=0 if no default statement
|
||||
|
||||
// LDC
|
||||
Statement *enclosingScopeExit;
|
||||
|
||||
SwitchStatement(Loc loc, Expression *c, Statement *b);
|
||||
Statement *syntaxCopy();
|
||||
@@ -491,6 +494,9 @@ struct CaseStatement : Statement
|
||||
int index; // which case it is (since we sort this)
|
||||
block *cblock; // back end: label for the block
|
||||
|
||||
// LDC
|
||||
Statement *enclosingScopeExit;
|
||||
|
||||
CaseStatement(Loc loc, Expression *exp, Statement *s);
|
||||
Statement *syntaxCopy();
|
||||
Statement *semantic(Scope *sc);
|
||||
@@ -519,6 +525,9 @@ struct DefaultStatement : Statement
|
||||
block *cblock; // back end: label for the block
|
||||
#endif
|
||||
|
||||
// LDC
|
||||
Statement *enclosingScopeExit;
|
||||
|
||||
DefaultStatement(Loc loc, Statement *s);
|
||||
Statement *syntaxCopy();
|
||||
Statement *semantic(Scope *sc);
|
||||
|
||||
Reference in New Issue
Block a user