Move everything syntax-related to syntax/, break deps on rest of compiler
src/comp/syntax is currently just a sub-module of rustc, but it will, in the near future, be its own crate. This includes: - The AST data structure - The parser - The pretty-printer - Visit, walk, and fold - The syntax extension system - Some utility stuff that should be in the stdlib* *) Stdlib extensions currently require a snapshot before they can be used, and the win build is very broken right now. This is temporary and will be cleaned up when one of those problems goes away. A lot of code was moved by this patch, mostly towards a more organized layout. Some package paths did get longer, and I guess the new layout will take some getting used to. Sorry about that! Please try not to re-introduce any dependencies in syntax/ on any of the other src/comp/ subdirs.
This commit is contained in:
@@ -1457,7 +1457,7 @@ state obj type_names(std::map::hashmap[TypeRef, str] type_names,
|
||||
}
|
||||
|
||||
fn mk_type_names() -> type_names {
|
||||
auto nt = util::common::new_str_hash[TypeRef]();
|
||||
auto nt = syntax::_std::new_str_hash[TypeRef]();
|
||||
|
||||
fn hash(&TypeRef t) -> uint {
|
||||
ret t as uint;
|
||||
@@ -1519,7 +1519,7 @@ fn type_to_str_inner(type_names names,
|
||||
case (6) { ret "Label"; }
|
||||
|
||||
case (7) {
|
||||
ret "i" + util::common::istr(llvm::LLVMGetIntTypeWidth(ty)
|
||||
ret "i" + syntax::_std::istr(llvm::LLVMGetIntTypeWidth(ty)
|
||||
as int);
|
||||
}
|
||||
|
||||
@@ -1558,7 +1558,7 @@ fn type_to_str_inner(type_names names,
|
||||
i += 1u;
|
||||
if (tout as int == ty as int) {
|
||||
let uint n = vec::len[TypeRef](outer0) - i;
|
||||
ret "*\\" + util::common::istr(n as int);
|
||||
ret "*\\" + syntax::_std::istr(n as int);
|
||||
}
|
||||
}
|
||||
ret "*" + type_to_str_inner(names, outer,
|
||||
|
||||
Reference in New Issue
Block a user