rust/src/comp/driver/rustc.rs

37 lines
868 B
Rust
Raw Normal View History

2010-06-23 23:03:09 -05:00
// -*- rust -*-
import front.parser;
import front.token;
import middle.trans;
import middle.resolve;
io fn main(vec[str] args) {
log "This is the rust 'self-hosted' compiler.";
log "The one written in rust.";
log "It does nothing yet, it's a placeholder.";
log "You want rustboot, the compiler next door.";
auto i = 0;
auto sess = session.session();
for (str filename in args) {
if (i > 0) {
auto p = parser.new_parser(sess, 0, filename);
auto crate = parser.parse_crate(p);
crate = resolve.resolve_crate(sess, crate);
trans.trans_crate(sess, crate);
}
i += 1;
}
2010-06-23 23:03:09 -05:00
}
// Local Variables:
// mode: rust
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C ../.. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End: