aboutsummaryrefslogtreecommitdiff
path: root/src/comp/driver
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-21 16:22:32 -0700
committerGraydon Hoare <[email protected]>2010-09-21 16:22:32 -0700
commit1f0621d04ee9d938ba7d07df76837b86f43c6158 (patch)
tree85c1a6034f9858156d6188d1690abb68cb128d36 /src/comp/driver
parentAdd insn-selection fixup-name logging. (diff)
downloadrust-1f0621d04ee9d938ba7d07df76837b86f43c6158.tar.xz
rust-1f0621d04ee9d938ba7d07df76837b86f43c6158.zip
Begin teaching rustc to parse literals, atoms, stmts, blocks, items, modules, crates.
Diffstat (limited to 'src/comp/driver')
-rw-r--r--src/comp/driver/rustc.rs22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs
index a5463940..d00d2e68 100644
--- a/src/comp/driver/rustc.rs
+++ b/src/comp/driver/rustc.rs
@@ -27,22 +27,12 @@ fn main(vec[str] args) {
auto i = 0;
auto sess = session.session();
for (str filename in args) {
- if (i > 0) {
- auto p = parser.new_parser(sess, filename);
- log "opened file: " + filename;
- auto tok = p.peek();
- while (true) {
- alt (tok) {
- case (token.EOF()) { ret; }
- case (_) {
- log token.to_str(tok);
- p.bump();
- tok = p.peek();
- }
- }
- }
- }
- i += 1;
+ if (i > 0) {
+ auto p = parser.new_parser(sess, filename);
+ log "opened file: " + filename;
+ auto crate = parser.parse_crate(p);
+ }
+ i += 1;
}
// Test LLVM module-writing. Nothing interesting yet.