diff options
| author | Brian Anderson <[email protected]> | 2011-05-11 23:04:16 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-05-11 23:04:16 -0400 |
| commit | a459bcd12722ee722176dff8782d50b9536067bc (patch) | |
| tree | 5223f42668991de283cfe99e5ee7ce9e93f20062 /src/comp/pretty/pprust.rs | |
| parent | rustc: Represent types as uints. Cuts typechecking down from 14s to 12s. (diff) | |
| download | rust-a459bcd12722ee722176dff8782d50b9536067bc.tar.xz rust-a459bcd12722ee722176dff8782d50b9536067bc.zip | |
Give the lexer a session so that it can fail more informatively
Diffstat (limited to 'src/comp/pretty/pprust.rs')
| -rw-r--r-- | src/comp/pretty/pprust.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index ceef6256..3c417eff 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -2,6 +2,7 @@ import std.Vec; import std.Str; import std.IO; import std.Option; +import driver.session.session; import front.ast; import front.lexer; import util.common; @@ -15,8 +16,8 @@ type ps = @rec(pp.ps s, Option.t[vec[lexer.cmnt]] comments, mutable uint cur_cmnt); -fn print_file(ast._mod _mod, str filename, IO.writer out) { - auto cmnts = lexer.gather_comments(filename); +fn print_file(session sess, ast._mod _mod, str filename, IO.writer out) { + auto cmnts = lexer.gather_comments(sess, filename); auto s = @rec(s=pp.mkstate(out, default_columns), comments=Option.some[vec[lexer.cmnt]](cmnts), mutable cur_cmnt=0u); |