Differences From Artifact [fbe471845b86f859]:
- File
polemy/parse.d
- 2010-11-11 02:40:08 - part of checkin [8e6fa743ee] on branch trunk - added layered parameter AST (only AST. no parser and no evaluator). (user: kinaba) [annotate]
To Artifact [d3a7b70fa2f3b803]:
- File
polemy/parse.d
- 2010-11-11 15:22:55 - part of checkin [6f0ec5b7c9] on branch trunk - Custom Test Runner (user: kinaba) [annotate]
243 this(Lexer lex) { this.lex = lex; } 243 this(Lexer lex) { this.lex = lex; }
244 244
245 void eat(string kwd, lazy string msg) 245 void eat(string kwd, lazy string msg)
246 { 246 {
247 if( !tryEat(kwd) ) 247 if( !tryEat(kwd) )
248 if( lex.empty ) 248 if( lex.empty )
249 throw genex!UnexpectedEOF( 249 throw genex!UnexpectedEOF(
250 currentPosition(), sprintf!"%s is expect | 250 currentPosition(), sprintf!"%s is expect
251 else 251 else
252 throw genex!ParseException( 252 throw genex!ParseException(
253 currentPosition(), sprintf!"%s is expect 253 currentPosition(), sprintf!"%s is expect
254 } 254 }
255 255
256 bool tryEat(string kwd) 256 bool tryEat(string kwd)
257 { 257 {