Mercurial > projects > ldc
comparison dmd/statement.h @ 1159:c6d6a68bb5db
Add back some enclosing scope-exit information to the frontend to produce
proper error messages inside switch statements.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 28 Mar 2009 14:39:16 +0100 |
parents | f99a3b393c03 |
children | e961851fb8be |
comparison
equal
deleted
inserted
replaced
1158:08c1c3bfea5a | 1159:c6d6a68bb5db |
---|---|
467 DefaultStatement *sdefault; | 467 DefaultStatement *sdefault; |
468 | 468 |
469 Array gotoCases; // array of unresolved GotoCaseStatement's | 469 Array gotoCases; // array of unresolved GotoCaseStatement's |
470 Array *cases; // array of CaseStatement's | 470 Array *cases; // array of CaseStatement's |
471 int hasNoDefault; // !=0 if no default statement | 471 int hasNoDefault; // !=0 if no default statement |
472 | |
473 // LDC | |
474 Statement *enclosingScopeExit; | |
472 | 475 |
473 SwitchStatement(Loc loc, Expression *c, Statement *b); | 476 SwitchStatement(Loc loc, Expression *c, Statement *b); |
474 Statement *syntaxCopy(); | 477 Statement *syntaxCopy(); |
475 Statement *semantic(Scope *sc); | 478 Statement *semantic(Scope *sc); |
476 int hasBreak(); | 479 int hasBreak(); |
489 Expression *exp; | 492 Expression *exp; |
490 Statement *statement; | 493 Statement *statement; |
491 int index; // which case it is (since we sort this) | 494 int index; // which case it is (since we sort this) |
492 block *cblock; // back end: label for the block | 495 block *cblock; // back end: label for the block |
493 | 496 |
497 // LDC | |
498 Statement *enclosingScopeExit; | |
499 | |
494 CaseStatement(Loc loc, Expression *exp, Statement *s); | 500 CaseStatement(Loc loc, Expression *exp, Statement *s); |
495 Statement *syntaxCopy(); | 501 Statement *syntaxCopy(); |
496 Statement *semantic(Scope *sc); | 502 Statement *semantic(Scope *sc); |
497 int compare(Object *obj); | 503 int compare(Object *obj); |
498 int usesEH(); | 504 int usesEH(); |
516 { | 522 { |
517 Statement *statement; | 523 Statement *statement; |
518 #if IN_GCC | 524 #if IN_GCC |
519 block *cblock; // back end: label for the block | 525 block *cblock; // back end: label for the block |
520 #endif | 526 #endif |
527 | |
528 // LDC | |
529 Statement *enclosingScopeExit; | |
521 | 530 |
522 DefaultStatement(Loc loc, Statement *s); | 531 DefaultStatement(Loc loc, Statement *s); |
523 Statement *syntaxCopy(); | 532 Statement *syntaxCopy(); |
524 Statement *semantic(Scope *sc); | 533 Statement *semantic(Scope *sc); |
525 int usesEH(); | 534 int usesEH(); |