about summary refs log tree commit diff
path: root/src/comp/syntax
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-12-22 17:53:53 -0800
committerGraydon Hoare <graydon@mozilla.com>2011-12-22 17:53:53 -0800
commitf0dfbe7b1b8d630488441982cf3d46f82a3a89db (patch)
tree8e26605c3d3628cd336e566b8ec7391c058c3a1a /src/comp/syntax
parentccb5b6fb259d5de9be751175fc53df1eaea4cd2c (diff)
downloadrust-f0dfbe7b1b8d630488441982cf3d46f82a3a89db.tar.gz
rust-f0dfbe7b1b8d630488441982cf3d46f82a3a89db.zip
Register new snapshots, purge log_err and log_full in favour of log(...).
Diffstat (limited to 'src/comp/syntax')
-rw-r--r--src/comp/syntax/ext/fmt.rs12
-rw-r--r--src/comp/syntax/parse/lexer.rs6
-rw-r--r--src/comp/syntax/parse/parser.rs8
-rw-r--r--src/comp/syntax/print/pp.rs2
-rw-r--r--src/comp/syntax/print/pprust.rs2
5 files changed, 13 insertions, 17 deletions
diff --git a/src/comp/syntax/ext/fmt.rs b/src/comp/syntax/ext/fmt.rs
index b91c19644bb..0530b743eef 100644
--- a/src/comp/syntax/ext/fmt.rs
+++ b/src/comp/syntax/ext/fmt.rs
@@ -29,7 +29,7 @@ fn expand_syntax_ext(cx: ext_ctxt, sp: span, arg: @ast::expr,
                     "first argument to #fmt must be a " + "string literal.");
     let fmtspan = args[0].span;
     #debug("Format string:");
-    log_full(core::debug, fmt);
+    log(debug, fmt);
     fn parse_fmt_err_(cx: ext_ctxt, sp: span, msg: str) -> ! {
         cx.span_fatal(sp, msg);
     }
@@ -252,7 +252,7 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, pieces: [piece], args: [@ast::expr])
     }
     fn log_conv(c: conv) {
         alt c.param {
-          some(p) { log_full(core::debug, "param: " + int::to_str(p, 10u)); }
+          some(p) { log(debug, "param: " + int::to_str(p, 10u)); }
           _ { #debug("param: none"); }
         }
         for f: flag in c.flags {
@@ -265,20 +265,20 @@ fn pieces_to_expr(cx: ext_ctxt, sp: span, pieces: [piece], args: [@ast::expr])
             }
         }
         alt c.width {
-          count_is(i) { log_full(core::debug,
+          count_is(i) { log(debug,
                                  "width: count is " + int::to_str(i, 10u)); }
           count_is_param(i) {
-            log_full(core::debug,
+            log(debug,
                      "width: count is param " + int::to_str(i, 10u));
           }
           count_is_next_param. { #debug("width: count is next param"); }
           count_implied. { #debug("width: count is implied"); }
         }
         alt c.precision {
-          count_is(i) { log_full(core::debug,
+          count_is(i) { log(debug,
                                  "prec: count is " + int::to_str(i, 10u)); }
           count_is_param(i) {
-            log_full(core::debug,
+            log(debug,
                      "prec: count is param " + int::to_str(i, 10u));
           }
           count_is_next_param. { #debug("prec: count is next param"); }
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index 9821f7bdfa9..338c29ddb07 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -580,7 +580,7 @@ fn read_line_comments(rdr: reader, code_to_the_left: bool) -> cmnt {
     let lines: [str] = [];
     while rdr.curr() == '/' && rdr.next() == '/' {
         let line = read_one_line_comment(rdr);
-        log_full(core::debug, line);
+        log(debug, line);
         lines += [line];
         consume_non_eol_whitespace(rdr);
     }
@@ -603,7 +603,7 @@ fn trim_whitespace_prefix_and_push_line(&lines: [str], s: str, col: uint) {
             s1 = str::slice(s, col, str::byte_len(s));
         } else { s1 = ""; }
     } else { s1 = s; }
-    log_full(core::debug, "pushing line: " + s1);
+    log(debug, "pushing line: " + s1);
     lines += [s1];
 }
 
@@ -707,7 +707,7 @@ fn gather_comments_and_literals(cm: codemap::codemap, path: str,
         if is_lit(tok.tok) {
             literals += [{lit: rdr.get_str_from(tok.bpos), pos: tok.chpos}];
         }
-        log_full(core::debug, "tok: " + token::to_str(rdr, tok.tok));
+        log(debug, "tok: " + token::to_str(rdr, tok.tok));
         first_read = false;
     }
     ret {cmnts: comments, lits: literals};
diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs
index 209d56a51d0..3f2c11dd821 100644
--- a/src/comp/syntax/parse/parser.rs
+++ b/src/comp/syntax/parse/parser.rs
@@ -165,8 +165,7 @@ fn bad_expr_word_table() -> hashmap<str, ()> {
                  "cont", "ret", "be", "fail", "type", "resource", "check",
                  "assert", "claim", "native", "fn", "lambda", "pure",
                  "unsafe", "block", "import", "export", "let", "const",
-                 "log", "log_err", "log_full",
-                 "tag", "obj", "copy", "sendfn", "impl"] {
+                 "log", "tag", "obj", "copy", "sendfn", "impl"] {
         words.insert(word, ());
     }
     words
@@ -910,10 +909,7 @@ fn parse_bottom_expr(p: parser) -> @ast::expr {
             hi = e.span.hi;
             ex = ast::expr_fail(some(e));
         } else { ex = ast::expr_fail(none); }
-    } else if
-        (eat_word(p, "log_full")
-         || eat_word(p, "log")
-         || eat_word(p, "log_err")) {
+    } else if eat_word(p, "log") {
         expect(p, token::LPAREN);
         let lvl = parse_expr(p);
         expect(p, token::COMMA);
diff --git a/src/comp/syntax/print/pp.rs b/src/comp/syntax/print/pp.rs
index e113817788b..02e34ccee88 100644
--- a/src/comp/syntax/print/pp.rs
+++ b/src/comp/syntax/print/pp.rs
@@ -413,7 +413,7 @@ obj printer(out: io::writer,
     fn print(x: token, L: int) {
         #debug("print %s %d (remaining line space=%d)", tok_str(x), L,
                space);
-        log_full(core::debug, buf_str(token, size, left, right, 6u));
+        log(debug, buf_str(token, size, left, right, 6u));
         alt x {
           BEGIN(b) {
             if L > space {
diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs
index 976fa3f1b96..ac032ffa76a 100644
--- a/src/comp/syntax/print/pprust.rs
+++ b/src/comp/syntax/print/pprust.rs
@@ -916,7 +916,7 @@ fn print_expr(s: ps, &&expr: @ast::expr) {
           1 { word_nbsp(s, "log"); print_expr(s, expr); }
           0 { word_nbsp(s, "log_err"); print_expr(s, expr); }
           2 {
-            word_nbsp(s, "log_full");
+            word_nbsp(s, "log");
             popen(s);
             print_expr(s, lexp);
             word(s.s, ",");