rustc: Annotate variants with their types. This may be useful for trans!

This commit is contained in:
Patrick Walton 2010-12-01 15:27:38 -08:00
parent cd97b9d965
commit fd600bad46
4 changed files with 20 additions and 9 deletions

View file

@ -183,7 +183,7 @@ tag mod_index_entry {
type _mod = rec(vec[@item] items,
hashmap[ident,mod_index_entry] index);
type variant = rec(str name, vec[@ty] args, def_id id);
type variant = rec(str name, vec[@ty] args, def_id id, ann ann);
type item = spanned[item_];
tag item_ {

View file

@ -1283,7 +1283,8 @@ impure fn parse_item_tag(parser p) -> @ast.item {
expect(p, token.SEMI);
auto id = p.next_def_id();
variants += vec(rec(name=name, args=args, id=id));
variants += vec(rec(name=name, args=args, id=id,
ann=ast.ann_none));
}
case (token.RBRACE) { /* empty */ }
case (_) {