diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-07-12 10:59:18 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-07-14 12:00:48 -0700 |
| commit | be489ee9e2f30d2daf1c9726536631162e21dff5 (patch) | |
| tree | 532d570a7b7971a4be83eeeb969bff9b12ecfb87 /src/comp/syntax/parse | |
| parent | 4664b67ea2d0240cf121851d6c47e72bc26222b8 (diff) | |
| download | rust-be489ee9e2f30d2daf1c9726536631162e21dff5.tar.gz rust-be489ee9e2f30d2daf1c9726536631162e21dff5.zip | |
rustc: Move much of metadata reading over to interior vectors
Diffstat (limited to 'src/comp/syntax/parse')
| -rw-r--r-- | src/comp/syntax/parse/lexer.rs | 6 | ||||
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs index 29670d21e86..77bde628014 100644 --- a/src/comp/syntax/parse/lexer.rs +++ b/src/comp/syntax/parse/lexer.rs @@ -1,5 +1,5 @@ -import std::io; +import std::ioivec; import std::str; import std::vec; import std::int; @@ -734,8 +734,8 @@ type lit = rec(str lit, uint pos); fn gather_comments_and_literals(&codemap::codemap cm, str path) -> rec(cmnt[] cmnts, lit[] lits) { - auto srdr = io::file_reader(path); - auto src = str::unsafe_from_bytes(srdr.read_whole_stream()); + auto srdr = ioivec::file_reader(path); + auto src = str::unsafe_from_bytes_ivec(srdr.read_whole_stream()); auto itr = @interner::mk[str](str::hash, str::eq); auto rdr = new_reader(cm, src, codemap::new_filemap(path, 0u), itr); let cmnt[] comments = ~[]; diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index a8fd51993b1..d238e6eb2e7 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1,5 +1,5 @@ -import std::io; +import std::ioivec; import std::ivec; import std::vec; import std::str; @@ -59,8 +59,8 @@ fn new_parser_from_file(parse_sess sess, ast::crate_cfg cfg, str path, uint pos) -> parser { auto ftype = SOURCE_FILE; if (str::ends_with(path, ".rc")) { ftype = CRATE_FILE; } - auto srdr = io::file_reader(path); - auto src = str::unsafe_from_bytes(srdr.read_whole_stream()); + auto srdr = ioivec::file_reader(path); + auto src = str::unsafe_from_bytes_ivec(srdr.read_whole_stream()); auto filemap = codemap::new_filemap(path, pos); vec::push(sess.cm.files, filemap); auto itr = @interner::mk(str::hash, str::eq); |
