diff options
| author | Graydon Hoare <[email protected]> | 2011-03-04 14:15:19 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-04 14:19:48 -0800 |
| commit | 596face2745ccc11a959a530807ea3e36e9d1354 (patch) | |
| tree | 3f448581a2d193a759e7c07b1245dab6fbf655f7 /src/comp/front/ast.rs | |
| parent | Build empty wrappers. This lets us compile hello world, but so far it (diff) | |
| download | rust-596face2745ccc11a959a530807ea3e36e9d1354.tar.xz rust-596face2745ccc11a959a530807ea3e36e9d1354.zip | |
Parse (and generally ignore) constraints and constrained types.
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index e9dee7ec..a8bf4b00 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -231,8 +231,17 @@ tag ty_ { ty_path(path, option.t[def]); ty_mutable(@ty); ty_type; + ty_constr(@ty, vec[@constr]); } +tag constr_arg_ { + carg_base; + carg_ident(ident); +} +type constr_arg = spanned[constr_arg_]; +type constr_ = rec(path path, vec[@constr_arg] args); +type constr = spanned[constr_]; + type arg = rec(mode mode, @ty ty, ident ident, def_id id); type fn_decl = rec(effect effect, vec[arg] inputs, |