rustc: Make AST tuple types use interior vectors

This commit is contained in:
Patrick Walton 2011-07-06 15:53:47 -07:00
parent 401b6362d7
commit aad0bcc8d5
4 changed files with 5 additions and 9 deletions

View file

@ -401,7 +401,7 @@ tag ty_ {
ty_task;
ty_port(@ty);
ty_chan(@ty);
ty_tup(vec[mt]);
ty_tup(mt[]);
ty_rec(vec[ty_field]);
ty_fn(proto, vec[ty_arg], @ty, controlflow, vec[@constr]);
ty_obj(vec[ty_method]);

View file

@ -520,8 +520,8 @@ fn parse_ty(&parser p) -> @ast::ty {
expect(p, token::RBRACKET);
} else if (eat_word(p, "tup")) {
auto elems =
parse_seq(token::LPAREN, token::RPAREN, some(token::COMMA),
parse_mt, p);
parse_seq_ivec(token::LPAREN, token::RPAREN, some(token::COMMA),
parse_mt, p);
hi = elems.span.hi;
t = ast::ty_tup(elems.node);
} else if (eat_word(p, "rec")) {

View file

@ -301,7 +301,7 @@ fn print_type(&ps s, &ast::ty ty) {
case (ast::ty_tup(?elts)) {
word(s.s, "tup");
popen(s);
commasep(s, inconsistent, elts, print_mt);
commasep_ivec(s, inconsistent, elts, print_mt);
pclose(s);
}
case (ast::ty_rec(?fields)) {