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:
parent
079512494f
commit
2b36e40c58
6 changed files with 224 additions and 202 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue