diff options
| author | Patrick Walton <[email protected]> | 2010-11-03 16:43:12 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-11-19 17:50:45 -0800 |
| commit | c00bda539d79e4411e086d505c697662942ee00b (patch) | |
| tree | ac121a5bf1275b57770add6e443434fa13eb6915 /src/comp/front | |
| parent | rustboot: Say when a binary operator is unimplemented rather than asserting i... (diff) | |
| download | rust-c00bda539d79e4411e086d505c697662942ee00b.tar.xz rust-c00bda539d79e4411e086d505c697662942ee00b.zip | |
rustc: First stab at a typechecker
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/ast.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index c3b38cb6..3a67d2f2 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -1,6 +1,7 @@ import std.map.hashmap; import std.option; +import middle.typeck; import util.common.span; import util.common.spanned; @@ -17,7 +18,7 @@ type def_id = tup(crate_num, def_num); // Annotations added during successive passes. tag ann { ann_none; - ann_type(@ty); + ann_type(@typeck.ty); } tag def { @@ -119,6 +120,8 @@ tag lit_ { lit_bool(bool); } +// NB: If you change this, you'll probably want to change the corresponding +// type structure in middle/typeck.rs as well. type ty = spanned[ty_]; tag ty_ { ty_nil; |