rustc: Annotate variants with their types. This may be useful for trans!
This commit is contained in:
parent
cd97b9d965
commit
fd600bad46
4 changed files with 20 additions and 9 deletions
|
|
@ -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_ {
|
||||
|
|
|
|||
|
|
@ -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 (_) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue