about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-08-11 19:14:38 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-12 12:08:27 -0700
commit7d05da96f72d96eae1367c21064d7ab3c9a3f2bb (patch)
treef340bce79826ceb7ca58295246e7d2406a33a758 /src/comp/syntax
parent0b71d1d445c01e1763f38ab62372f7e07b7ff0ff (diff)
downloadrust-7d05da96f72d96eae1367c21064d7ab3c9a3f2bb.tar.gz
rust-7d05da96f72d96eae1367c21064d7ab3c9a3f2bb.zip
Rename std::ioivec to std::io
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/codemap.rs22
-rw-r--r--src/comp/syntax/parse/lexer.rs4
-rw-r--r--src/comp/syntax/parse/parser.rs4
-rw-r--r--src/comp/syntax/print/pp.rs6
-rw-r--r--src/comp/syntax/print/pprust.rs12
5 files changed, 24 insertions, 24 deletions
diff --git a/src/comp/syntax/codemap.rs b/src/comp/syntax/codemap.rs
index 468e94255f0..40021bd4e56 100644
--- a/src/comp/syntax/codemap.rs
+++ b/src/comp/syntax/codemap.rs
@@ -2,7 +2,7 @@ import std::ivec;
 import std::uint;
 import std::str;
 import std::termivec;
-import std::ioivec;
+import std::io;
 import std::option;
 import std::option::some;
 import std::option::none;
@@ -84,15 +84,15 @@ fn emit_diagnostic(sp: &option::t[span], msg: &str, kind: &str, color: u8,
       }
       none. { }
     }
-    ioivec::stdout().write_str(ss + ": ");
+    io::stdout().write_str(ss + ": ");
     if termivec::color_supported() {
-        termivec::fg(ioivec::stdout().get_buf_writer(), color);
+        termivec::fg(io::stdout().get_buf_writer(), color);
     }
-    ioivec::stdout().write_str(#fmt("%s:", kind));
+    io::stdout().write_str(#fmt("%s:", kind));
     if termivec::color_supported() {
-        termivec::reset(ioivec::stdout().get_buf_writer());
+        termivec::reset(io::stdout().get_buf_writer());
     }
-    ioivec::stdout().write_str(#fmt(" %s\n", msg));
+    io::stdout().write_str(#fmt(" %s\n", msg));
 
     maybe_highlight_lines(sp, cm, maybe_lines);
 }
@@ -108,7 +108,7 @@ fn maybe_highlight_lines(sp: &option::t[span], cm: &codemap,
 
         // FIXME: reading in the entire file is the worst possible way to
         //        get access to the necessary lines.
-        let file = ioivec::read_whole_file_str(lines.name);
+        let file = io::read_whole_file_str(lines.name);
         let fm = get_filemap(cm, lines.name);
 
         // arbitrarily only print up to six lines of the error
@@ -121,10 +121,10 @@ fn maybe_highlight_lines(sp: &option::t[span], cm: &codemap,
         }
         // Print the offending lines
         for line: uint  in display_lines {
-            ioivec::stdout().write_str(#fmt("%s:%u ", fm.name, line + 1u));
+            io::stdout().write_str(#fmt("%s:%u ", fm.name, line + 1u));
             let s = get_line(fm, line as int, file);
             if !str::ends_with(s, "\n") { s += "\n"; }
-            ioivec::stdout().write_str(s);
+            io::stdout().write_str(s);
         }
         if elided {
             let last_line = display_lines.(ivec::len(display_lines) - 1u);
@@ -133,7 +133,7 @@ fn maybe_highlight_lines(sp: &option::t[span], cm: &codemap,
             let out = "";
             while indent > 0u { out += " "; indent -= 1u; }
             out += "...\n";
-            ioivec::stdout().write_str(out);
+            io::stdout().write_str(out);
         }
 
 
@@ -158,7 +158,7 @@ fn maybe_highlight_lines(sp: &option::t[span], cm: &codemap,
                 let width = hi.col - lo.col - 1u;
                 while width > 0u { str::push_char(s, '~'); width -= 1u; }
             }
-            ioivec::stdout().write_str(s + "\n");
+            io::stdout().write_str(s + "\n");
         }
       }
       _ { }
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index 15dabbb8d49..9e7ae3a24fc 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -1,5 +1,5 @@
 
-import std::ioivec;
+import std::io;
 import std::int;
 import std::ivec;
 import std::str;
@@ -709,7 +709,7 @@ fn is_lit(t: &token::token) -> bool {
 type lit = {lit: str, pos: uint};
 
 fn gather_comments_and_literals(cm: &codemap::codemap, path: str,
-                                srdr: ioivec::reader) ->
+                                srdr: io::reader) ->
    {cmnts: [cmnt], lits: [lit]} {
     let src = str::unsafe_from_bytes(srdr.read_whole_stream());
     let itr = @interner::mk[str](str::hash, str::eq);
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index d956b28f8b0..e13ecca7232 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -1,5 +1,5 @@
 
-import std::ioivec;
+import std::io;
 import std::ivec;
 import std::str;
 import std::option;
@@ -62,7 +62,7 @@ fn new_parser_from_file(sess: parse_sess, cfg:
                         ast::crate_cfg, path: str,
                         chpos: uint, byte_pos: uint,
                         ftype: file_type) -> parser {
-    let src = ioivec::read_whole_file_str(path);
+    let src = io::read_whole_file_str(path);
     let filemap = codemap::new_filemap(path, chpos, byte_pos);
     sess.cm.files += ~[filemap];
     let itr = @interner::mk(str::hash, str::eq);
diff --git a/src/comp/syntax/print/pp.rs b/src/comp/syntax/print/pp.rs
index 00b6c5f32bf..98770cf0e46 100644
--- a/src/comp/syntax/print/pp.rs
+++ b/src/comp/syntax/print/pp.rs
@@ -1,5 +1,5 @@
 
-import std::ioivec;
+import std::io;
 import std::ivec;
 import std::str;
 
@@ -98,7 +98,7 @@ type print_stack_elt = {offset: int, pbreak: print_stack_break};
 
 const size_infinity: int = 0xffff;
 
-fn mk_printer(out: ioivec::writer, linewidth: uint) -> printer {
+fn mk_printer(out: io::writer, linewidth: uint) -> printer {
     // Yes 3, it makes the ring buffers big enough to never
     // fall behind.
 
@@ -198,7 +198,7 @@ fn mk_printer(out: ioivec::writer, linewidth: uint) -> printer {
  * the method called 'pretty_print', and the 'PRINT' process is the method
  * called 'print'.
  */
-obj printer(out: ioivec::writer,
+obj printer(out: io::writer,
             buf_len: uint,
             mutable margin: int, // width of lines we're constrained to
 
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 5c8f9c7aced..45fd48bcd86 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -1,7 +1,7 @@
 
 import std::ivec;
 import std::int;
-import std::ioivec;
+import std::io;
 import std::str;
 import std::uint;
 import std::option;
@@ -52,7 +52,7 @@ fn ibox(s: &ps, u: uint) { s.boxes += ~[pp::inconsistent]; pp::ibox(s.s, u); }
 
 fn end(s: &ps) { ivec::pop(s.boxes); pp::end(s.s); }
 
-fn rust_printer(writer: ioivec::writer) -> ps {
+fn rust_printer(writer: io::writer) -> ps {
     let boxes: [pp::breaks] = ~[];
     ret @{s: pp::mk_printer(writer, default_columns),
           cm: none[codemap],
@@ -73,7 +73,7 @@ const default_columns: uint = 78u;
 // it can scan the input text for comments and literals to
 // copy forward.
 fn print_crate(cm: &codemap, crate: @ast::crate, filename: str,
-               in: ioivec::reader, out: ioivec::writer, ann: &pp_ann) {
+               in: io::reader, out: io::writer, ann: &pp_ann) {
     let boxes: [pp::breaks] = ~[];
     let r = lexer::gather_comments_and_literals(cm, filename, in);
     let s =
@@ -103,7 +103,7 @@ fn item_to_str(i: &@ast::item) -> str { be to_str(i, print_item); }
 fn path_to_str(p: &ast::path) -> str { be to_str(p, print_path); }
 
 fn fun_to_str(f: &ast::_fn, name: str, params: &[ast::ty_param]) -> str {
-    let writer = ioivec::string_writer();
+    let writer = io::string_writer();
     let s = rust_printer(writer.get_writer());
     print_fn(s, f.decl, f.proto, name, params, f.decl.constraints);
     eof(s.s);
@@ -111,7 +111,7 @@ fn fun_to_str(f: &ast::_fn, name: str, params: &[ast::ty_param]) -> str {
 }
 
 fn block_to_str(blk: &ast::blk) -> str {
-    let writer = ioivec::string_writer();
+    let writer = io::string_writer();
     let s = rust_printer(writer.get_writer());
     // containing cbox, will be closed by print-block at }
 
@@ -1494,7 +1494,7 @@ fn escape_str(st: str, to_escape: char) -> str {
 }
 
 fn to_str[T](t: &T, f: fn(&ps, &T) ) -> str {
-    let writer = ioivec::string_writer();
+    let writer = io::string_writer();
     let s = rust_printer(writer.get_writer());
     f(s, t);
     eof(s.s);