aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/creader.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-29 14:46:42 -0700
committerPatrick Walton <[email protected]>2011-03-29 14:46:42 -0700
commit94c061729b66adc777cf346417ab236a5d7d8410 (patch)
treeeadcdc9c3d3846df0a936ca30d99b37f7ebcaf62 /src/comp/front/creader.rs
parentRename trans_native to trans_native_call, for clarity. (diff)
downloadrust-94c061729b66adc777cf346417ab236a5d7d8410.tar.xz
rust-94c061729b66adc777cf346417ab236a5d7d8410.zip
rustc: Resolve external modules and native modules to definition IDs as well
Diffstat (limited to 'src/comp/front/creader.rs')
-rw-r--r--src/comp/front/creader.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs
index 735dbcb4..a08de2ab 100644
--- a/src/comp/front/creader.rs
+++ b/src/comp/front/creader.rs
@@ -360,6 +360,7 @@ impure fn move_to_item(&ebml.reader ebml_r, int item_id) {
}
log #fmt("move_to_item: item not found: %d", item_id);
+ fail;
}
// Looks up an item in the given metadata and returns an EBML reader pointing
@@ -559,11 +560,13 @@ fn lookup_def(session.session sess, &span sp, int cnum, vec[ast.ident] path)
did = tup(cnum, did._1);
// FIXME: It'd be great if we had u8 char literals.
- if (kind_ch == ('c' as u8)) { ret ast.def_const(did); }
- else if (kind_ch == ('f' as u8)) { ret ast.def_fn(did); }
- else if (kind_ch == ('y' as u8)) { ret ast.def_ty(did); }
- else if (kind_ch == ('o' as u8)) { ret ast.def_obj(did); }
- else if (kind_ch == ('t' as u8)) { ret ast.def_ty(did); }
+ if (kind_ch == ('c' as u8)) { ret ast.def_const(did); }
+ else if (kind_ch == ('f' as u8)) { ret ast.def_fn(did); }
+ else if (kind_ch == ('y' as u8)) { ret ast.def_ty(did); }
+ else if (kind_ch == ('o' as u8)) { ret ast.def_obj(did); }
+ else if (kind_ch == ('t' as u8)) { ret ast.def_ty(did); }
+ else if (kind_ch == ('m' as u8)) { ret ast.def_mod(did); }
+ else if (kind_ch == ('n' as u8)) { ret ast.def_native_mod(did); }
else if (kind_ch == ('v' as u8)) {
auto tid = get_variant_tag_id(ebml_r);
tid = tup(cnum, tid._1);