Merge remote-tracking branch 'graydon/master' into typestate_4

This commit is contained in:
Tim Chevalier 2011-05-20 18:23:03 -07:00
commit 467b938ea8
11 changed files with 281 additions and 28 deletions

View file

@ -379,7 +379,7 @@ type anon_obj = rec(
option::t[vec[obj_field]] fields,
vec[@method] methods,
// with_obj: the original object being extended, if it exists.
option::t[ident] with_obj);
option::t[@expr] with_obj);
type _mod = rec(vec[@view_item] view_items,
vec[@item] items);

View file

@ -820,13 +820,13 @@ fn parse_bottom_expr(&parser p) -> @ast::expr {
}
let vec[@ast::method] meths = [];
let option::t[ast::ident] with_obj = none[ast::ident];
let option::t[@ast::expr] with_obj = none[@ast::expr];
expect(p, token::LBRACE);
while (p.peek() != token::RBRACE) {
if (eat_word(p, "with")) {
with_obj = some[ast::ident](parse_ident(p));
with_obj = some[@ast::expr](parse_expr(p));
} else {
vec::push[@ast::method](meths,
parse_method(p));