comparison trunk/src/dil/Statements.d @ 496:5a607597dc22

Improved error recovery in the Parser. The Parser skips to the next valid token if an illegal Declaration, Statement or AsmInstruction was found. Refactored a few things in Lexer.d and LexerFuncs.d.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 09 Dec 2007 13:04:15 +0100
parents b60450804b6e
children 3bb94ba21490
comparison
equal deleted inserted replaced
495:b60450804b6e 496:5a607597dc22
30 } 30 }
31 } 31 }
32 32
33 class IllegalStatement : Statement 33 class IllegalStatement : Statement
34 { 34 {
35 Token* tok; 35 this()
36 this(Token* tok) 36 {
37 { 37 mixin(set_kind);
38 mixin(set_kind);
39 this.tok = tok;
40 } 38 }
41 } 39 }
42 40
43 class EmptyStatement : Statement 41 class EmptyStatement : Statement
44 { 42 {
458 } 456 }
459 } 457 }
460 458
461 class IllegalAsmInstruction : IllegalStatement 459 class IllegalAsmInstruction : IllegalStatement
462 { 460 {
463 this(Token* token) 461 this()
464 { 462 {
465 super(token);
466 mixin(set_kind); 463 mixin(set_kind);
467 } 464 }
468 } 465 }
469 466
470 class PragmaStatement : Statement 467 class PragmaStatement : Statement