Mercurial > projects > dil
comparison trunk/src/Parser.d @ 96:d12d31d5fc17
- Added out-contract to parseParameters().
author | aziz |
---|---|
date | Fri, 06 Jul 2007 18:49:00 +0000 |
parents | 0eb4c8a5b32b |
children | 1a83e5070a84 |
comparison
equal
deleted
inserted
replaced
95:0eb4c8a5b32b | 96:d12d31d5fc17 |
---|---|
681 } | 681 } |
682 assert(0); | 682 assert(0); |
683 } | 683 } |
684 | 684 |
685 Argument[] parseParameters() | 685 Argument[] parseParameters() |
686 out(args) | |
687 { | |
688 if (args.length > 1) | |
689 foreach (arg; args[0..$-1]) | |
690 { | |
691 if (arg.isVariadic()) | |
692 assert(0, "variadic arguments can only appear at the end of the parameter list."); | |
693 } | |
694 } | |
695 body | |
686 { | 696 { |
687 require(T.LParen); | 697 require(T.LParen); |
688 | 698 |
689 if (token.type == T.RParen) | 699 if (token.type == T.RParen) |
690 { | 700 { |