aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/front/ast.rs')
-rw-r--r--src/comp/front/ast.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 05daf5ee..c17eddee 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -66,9 +66,15 @@ type meta_item = spanned[meta_item_];
type meta_item_ = rec(ident name, str value);
type block = spanned[block_];
+type block_index = hashmap[ident, block_index_entry];
+tag block_index_entry {
+ bie_item(@item);
+ bie_local(@local);
+ bie_tag_variant(@item /* tag item */, uint /* variant index */);
+}
type block_ = rec(vec[@stmt] stmts,
option.t[@expr] expr,
- hashmap[ident,uint] index);
+ hashmap[ident,block_index_entry] index);
type variant_def = tup(def_id /* tag */, def_id /* variant */);