2010-06-23 23:03:09 -05:00
|
|
|
// -*- rust -*-
|
|
|
|
|
2010-09-23 17:46:31 -05:00
|
|
|
import front.parser;
|
|
|
|
import front.token;
|
|
|
|
import middle.trans;
|
2010-10-14 17:53:28 -05:00
|
|
|
import middle.resolve;
|
2010-08-18 02:19:45 -05:00
|
|
|
|
2010-09-29 19:22:07 -05:00
|
|
|
io fn main(vec[str] args) {
|
2010-07-13 16:26:59 -05:00
|
|
|
|
2010-07-08 12:45:34 -05: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 16:26:59 -05:00
|
|
|
|
|
|
|
auto i = 0;
|
2010-09-01 15:24:14 -05:00
|
|
|
auto sess = session.session();
|
2010-07-13 16:26:59 -05:00
|
|
|
for (str filename in args) {
|
2010-09-21 18:22:32 -05:00
|
|
|
if (i > 0) {
|
2010-10-18 18:15:25 -05:00
|
|
|
auto p = parser.new_parser(sess, 0, filename);
|
2010-09-21 18:22:32 -05:00
|
|
|
auto crate = parser.parse_crate(p);
|
2010-10-14 17:53:28 -05:00
|
|
|
crate = resolve.resolve_crate(sess, crate);
|
2010-09-22 19:05:38 -05:00
|
|
|
trans.trans_crate(sess, crate);
|
2010-09-21 18:22:32 -05:00
|
|
|
}
|
|
|
|
i += 1;
|
2010-07-13 16:26:59 -05:00
|
|
|
}
|
2010-06-23 23:03:09 -05:00
|
|
|
}
|
2010-08-12 12:29:23 -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:
|