error_type.accept (visitor);
}
+ foreach (Expression precondition in get_preconditions ()) {
+ precondition.accept (visitor);
+ }
+
+ foreach (Expression postcondition in get_postconditions ()) {
+ postcondition.accept (visitor);
+ }
+
if (body != null) {
body.accept (visitor);
}
error_type.check (analyzer);
}
+ foreach (Expression precondition in get_preconditions ()) {
+ precondition.check (analyzer);
+ }
+
+ foreach (Expression postcondition in get_postconditions ()) {
+ postcondition.check (analyzer);
+ }
+
if (body != null) {
body.check (analyzer);
method.add_error_type (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);
+ }
method.access = access;
set_attributes (method, attrs);
if (!accept (TokenType.SEMICOLON)) {