aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-31 15:57:36 -0700
committerGraydon Hoare <[email protected]>2011-03-31 15:57:36 -0700
commit1b65a61cad6fffebcc97e25688d0133d28181f44 (patch)
treec0de9d266d98ffd60455a0d5b6ff3313e54b5361 /src
parentFix error where make check would not produce compilers first, due to make's i... (diff)
downloadrust-1b65a61cad6fffebcc97e25688d0133d28181f44.tar.xz
rust-1b65a61cad6fffebcc97e25688d0133d28181f44.zip
Couple minor bug fixes in creader, lib-bitv, int, rand, sort, sha1, uint and vec all work.
Diffstat (limited to 'src')
-rw-r--r--src/comp/front/creader.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs
index d95e4523..5e790ed0 100644
--- a/src/comp/front/creader.rs
+++ b/src/comp/front/creader.rs
@@ -65,6 +65,11 @@ impure fn parse_ty_str(str rep, str_def sd) -> @ty.t {
auto len = _str.byte_len(rep);
auto st = @rec(rep=rep, mutable pos=0u, len=len);
auto result = parse_ty(st, sd);
+ if (st.pos != len) {
+ log "parse_ty_str: incomplete parse, stopped at byte "
+ + _uint.to_str(st.pos, 10u) + " of "
+ + _uint.to_str(len, 10u) + " in str '" + rep + "'";
+ }
check(st.pos == len);
ret result;
}
@@ -191,6 +196,7 @@ impure fn parse_sty(@pstate st, str_def sd) -> ty.sty {
inputs=func._0,
output=func._1));
}
+ st.pos += 1u;
ret ty.ty_obj(methods);
}
case ('X') {ret ty.ty_var(parse_int(st));}
@@ -544,6 +550,7 @@ fn kind_has_type_params(u8 kind_ch) -> bool {
// FIXME: It'd be great if we had u8 char literals.
if (kind_ch == ('c' as u8)) { ret false; }
else if (kind_ch == ('f' as u8)) { ret true; }
+ else if (kind_ch == ('F' as u8)) { ret true; }
else if (kind_ch == ('y' as u8)) { ret true; }
else if (kind_ch == ('o' as u8)) { ret true; }
else if (kind_ch == ('t' as u8)) { ret true; }
@@ -581,6 +588,7 @@ fn lookup_def(session.session sess, int cnum, vec[ast.ident] path)
auto def;
if (kind_ch == ('c' as u8)) { def = ast.def_const(did); }
else if (kind_ch == ('f' as u8)) { def = ast.def_fn(did); }
+ else if (kind_ch == ('F' as u8)) { def = ast.def_native_fn(did); }
else if (kind_ch == ('y' as u8)) { def = ast.def_ty(did); }
else if (kind_ch == ('o' as u8)) { def = ast.def_obj(did); }
else if (kind_ch == ('t' as u8)) {