Store items and decls in vecs to preserve input order, index externally. Implement block-local name lookup.

This commit is contained in:
Graydon Hoare 2010-10-18 18:19:16 -07:00
parent 865bbae685
commit 4a3edb320d
6 changed files with 232 additions and 137 deletions

View file

@ -47,6 +47,15 @@ fn istr(int i) -> str {
ret _int.to_str(i, 10u);
}
// FIXME: Weird bug. Due to the way we auto-deref + in +=, we can't append a
// boxed value to a vector-of-boxes using +=. Best to figure out a way to fix
// this. Deref-on-demand or something? It's a hazard of the ambiguity between
// single-element and vector append.
fn append[T](&vec[T] v, &T t) {
v += t;
}
//
// Local Variables:
// mode: rust