diff options
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/rustc.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index 67aa5308..42bd91c5 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -17,7 +17,7 @@ fn write_module() { llvm.LLVMDisposeModule(llmod); } -fn main(vec[str] args) -> () { +fn main(vec[str] args) { log "This is the rust 'self-hosted' compiler."; log "The one written in rust."; @@ -30,6 +30,16 @@ fn main(vec[str] args) -> () { auto p = parser.new_parser(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; } |