diff options
| author | Graydon Hoare <[email protected]> | 2010-12-14 15:32:13 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-12-14 15:32:13 -0800 |
| commit | b606ba81cf4f872e9aff4d4f8d23da6843ce0638 (patch) | |
| tree | 7ae26247cdcdcf97866ce3f18da5c46f88a341db /src/comp/front/ast.rs | |
| parent | Some terminology updates to talk about layers. (diff) | |
| download | rust-b606ba81cf4f872e9aff4d4f8d23da6843ce0638.tar.xz rust-b606ba81cf4f872e9aff4d4f8d23da6843ce0638.zip | |
Add obj items to AST and parser.
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index eb41f859..3b6ebd35 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -26,6 +26,7 @@ tag ann { tag def { def_fn(def_id); + def_obj(def_id); def_mod(def_id); def_const(def_id); def_arg(def_id); @@ -194,6 +195,15 @@ type _fn = rec(effect effect, @ty output, block body); + +type method_ = rec(ident ident, _fn meth, def_id id); +type method = spanned[method_]; + +type obj_field = rec(@ty ty, ident ident, def_id id); +type _obj = rec(vec[obj_field] fields, + vec[@method] methods); + + tag mod_index_entry { mie_item(uint); mie_tag_variant(uint /* tag item index */, uint /* variant index */); @@ -212,6 +222,7 @@ tag item_ { item_mod(ident, _mod, def_id); item_ty(ident, @ty, vec[ty_param], def_id, ann); item_tag(ident, vec[variant], vec[ty_param], def_id); + item_obj(ident, _obj, vec[ty_param], def_id, ann); } |