aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp/front')
-rw-r--r--src/comp/front/ast.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs
index 8cfffc39..af3ded19 100644
--- a/src/comp/front/ast.rs
+++ b/src/comp/front/ast.rs
@@ -24,11 +24,19 @@ type ty_param = ident;
// Annotations added during successive passes.
tag ann {
ann_none(uint);
- ann_type(middle.ty.t,
+ ann_type(uint,
+ middle.ty.t,
Option.t[vec[middle.ty.t]], /* ty param substs */
Option.t[@ts_ann]); /* pre- and postcondition for typestate */
}
+fn ann_tag(&ann a) -> uint {
+ ret alt (a) {
+ case (ann_none(?t)) { t }
+ case (ann_type(?t, _, _, _)) { t }
+ };
+}
+
tag def {
def_fn(def_id);
def_obj(def_id);