comparison trunk/src/dil/Declarations.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 9076c4cea2a4
comparison
equal deleted inserted replaced
495:b60450804b6e 496:5a607597dc22
89 89
90 void semantic(Scope) 90 void semantic(Scope)
91 {} 91 {}
92 } 92 }
93 93
94 /++
95 Illegal declarations encompass all tokens that don't
96 start a DeclarationDefinition.
97 See_Also: dil.Parser.isDeclDefStartToken()
98 +/
94 class IllegalDeclaration : Declaration 99 class IllegalDeclaration : Declaration
95 { 100 {
96 Token* token; 101 this()
97 this(Token* token) 102 {
98 { 103 mixin(set_kind);
99 mixin(set_kind);
100 this.token = token;
101 } 104 }
102 105
103 void semantic(Scope) 106 void semantic(Scope)
104 {} 107 {}
105 } 108 }