Differences From Artifact [3ad9850246d5111f]:
- File
polemy/parse.d
- 2010-11-26 05:29:24 - part of checkin [f8684f4d69] on branch trunk - changed the desugaring of >>@macro x=e from >>@macro x=e in x to >>@macro x=e in "(macro definition)" for convenience during REPL interaction (user: kinaba) [annotate]
To Artifact [45c4aa9e0628516e]:
- File
polemy/parse.d
- 2010-11-26 07:42:38 - part of checkin [f7e9e77316] on branch trunk - introduced "..." expression, and replaced the pattern match failure with this. (user: kinaba) [annotate]
265 265 return new Str(pos, lex.front.str);
266 266 }
267 267 if( isNumber(lex.front.str) )
268 268 {
269 269 scope(exit) lex.popFront;
270 270 return new Int(pos, BigInt(cast(string)lex.front.str));
271 271 }
272 + if( tryEat("...") )
273 + {
274 + return new Die(pos);
275 + }
272 276 if( tryEat("@") )
273 277 {
274 278 auto lay = "@"~eatId("for layer ID");
275 279 eat("(", "for layered execution");
276 280 auto e = Body();
277 281 eat(")", "after "~lay~"(...");
278 282 return new Lay(pos, lay, e);
................................................................................
356 360 return parsePatternMatchCases(casePos, pmVar, failBranchVar,
357 361 new Let(pos, tryThisBranchVar, [],
358 362 new Fun(pos,[],judgement), thenDoThis)
359 363 );
360 364 }
361 365 else
362 366 {
363 - AST doNothing = new Fun(casePos,[],
364 - new Str(casePos, sprintf!"(pattern match failure:%s)"(casePos)));
367 + AST doNothing = new Fun(casePos,[], new Die(casePos));
365 368 return new Let(casePos, tryThisBranchVar, [], doNothing, thenDoThis);
366 369 }
367 370 }
368 371
369 372 // hageshiku tenuki
370 373 abstract class SinglePattern
371 374 {