vala r1312 - in trunk: . vala
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1312 - in trunk: . vala
- Date: Wed, 23 Apr 2008 22:12:33 +0100 (BST)
Author: juergbi
Date: Wed Apr 23 21:12:33 2008
New Revision: 1312
URL: http://svn.gnome.org/viewvc/vala?rev=1312&view=rev
Log:
2008-04-23 Juerg Billeter <j bitron ch>
* vala/valaparser.vala: re-add support for pre- and postconditions
Modified:
trunk/ChangeLog
trunk/vala/valaparser.vala
Modified: trunk/vala/valaparser.vala
==============================================================================
--- trunk/vala/valaparser.vala (original)
+++ trunk/vala/valaparser.vala Wed Apr 23 21:12:33 2008
@@ -2121,6 +2121,16 @@
method.add_error_domain (parse_type ());
} while (accept (TokenType.COMMA));
}
+ while (accept (TokenType.REQUIRES)) {
+ expect (TokenType.OPEN_PARENS);
+ method.add_precondition (parse_expression ());
+ expect (TokenType.CLOSE_PARENS);
+ }
+ while (accept (TokenType.ENSURES)) {
+ expect (TokenType.OPEN_PARENS);
+ method.add_postcondition (parse_expression ());
+ expect (TokenType.CLOSE_PARENS);
+ }
if (!accept (TokenType.SEMICOLON)) {
method.body = parse_block ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]