diff options
| author | Graydon Hoare <[email protected]> | 2010-09-21 16:22:32 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-21 16:22:32 -0700 |
| commit | 1f0621d04ee9d938ba7d07df76837b86f43c6158 (patch) | |
| tree | 85c1a6034f9858156d6188d1690abb68cb128d36 /src/comp/driver | |
| parent | Add insn-selection fixup-name logging. (diff) | |
| download | rust-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.rs | 22 |
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. |