2010-06-23 21:03:09 -07:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2010-08-18 15:41:13 -07:00
|
|
|
import fe.parser;
|
|
|
|
import fe.token;
|
2010-09-22 15:21:06 -07:00
|
|
|
import me.trans;
|
2010-08-18 00:19:45 -07:00
|
|
|
|
2010-08-20 11:41:34 -07:00
|
|
|
fn main(vec[str] args) {
|
2010-07-13 14:26:59 -07:00
|
|
|
|
2010-07-08 10:45:34 -07:00
|
|
|
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.";
|
2010-07-13 14:26:59 -07:00
|
|
|
|
|
|
|
auto i = 0;
|
2010-09-01 13:24:14 -07:00
|
|
|
auto sess = session.session();
|
2010-07-13 14:26:59 -07:00
|
|
|
for (str filename in args) {
|
2010-09-21 16:22:32 -07:00
|
|
|
if (i > 0) {
|
|
|
|
auto p = parser.new_parser(sess, filename);
|
|
|
|
log "opened file: " + filename;
|
|
|
|
auto crate = parser.parse_crate(p);
|
2010-09-22 15:21:06 -07:00
|
|
|
trans.translate_crate(sess, crate);
|
2010-09-21 16:22:32 -07:00
|
|
|
}
|
|
|
|
i += 1;
|
2010-07-13 14:26:59 -07:00
|
|
|
}
|
2010-06-23 21:03:09 -07:00
|
|
|
}
|
2010-08-12 10:29:23 -07: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:
|