Ensure ann tags are actually kept around during typechecking

This way, the tag assigned by the parser stays with the node.
I realize ann replacing is probably going away real soon, but
I needed this now for moving the resolve defs out of the AST.
This commit is contained in:
Marijn Haverbeke 2011-05-12 10:51:13 +02:00
parent 079512494f
commit 2b36e40c58
6 changed files with 224 additions and 202 deletions

View file

@ -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);