diff options
| author | Patrick Walton <[email protected]> | 2010-12-12 16:30:34 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-12-12 16:30:34 -0800 |
| commit | 38ba0e691738981ef0b7302a3b03adbe264bb30d (patch) | |
| tree | 3fc180ecece0f93564f9b54ca8da4a12937e6893 /src/comp/front/ast.rs | |
| parent | rustc: Propagate types for vector, tuple, record, assignment, and if expressi... (diff) | |
| download | rust-38ba0e691738981ef0b7302a3b03adbe264bb30d.tar.xz rust-38ba0e691738981ef0b7302a3b03adbe264bb30d.zip | |
rustc: Add a definition ID to tag patterns
Diffstat (limited to 'src/comp/front/ast.rs')
| -rw-r--r-- | src/comp/front/ast.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index 11db3eed..eb41f859 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -44,11 +44,13 @@ type block_ = rec(vec[@stmt] stmts, option.t[@expr] expr, hashmap[ident,uint] index); +type variant_def = tup(def_id /* tag */, def_id /* variant */); + type pat = spanned[pat_]; tag pat_ { pat_wild(ann); pat_bind(ident, def_id, ann); - pat_tag(ident, vec[@pat], ann); + pat_tag(ident, vec[@pat], option.t[variant_def], ann); } tag mutability { |