diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libsyntax/parse/comments.rs | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
| download | rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.tar.gz rust-daf5f5a4d10513ff42e79fa7ef8819b170f3a13d.zip | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libsyntax/parse/comments.rs')
| -rw-r--r-- | src/libsyntax/parse/comments.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/libsyntax/parse/comments.rs b/src/libsyntax/parse/comments.rs index f163bec7d4e..38921648a2b 100644 --- a/src/libsyntax/parse/comments.rs +++ b/src/libsyntax/parse/comments.rs @@ -134,7 +134,7 @@ pub fn strip_doc_comment_decoration(comment: &str) -> ~str { return lines.connect("\n"); } - fail2!("not a doc-comment: {}", comment); + fail!("not a doc-comment: {}", comment); } fn read_to_eol(rdr: @mut StringReader) -> ~str { @@ -161,7 +161,7 @@ fn consume_non_eol_whitespace(rdr: @mut StringReader) { } fn push_blank_line_comment(rdr: @mut StringReader, comments: &mut ~[cmnt]) { - debug2!(">>> blank-line comment"); + debug!(">>> blank-line comment"); let v: ~[~str] = ~[]; comments.push(cmnt {style: blank_line, lines: v, pos: rdr.last_pos}); } @@ -179,9 +179,9 @@ fn consume_whitespace_counting_blank_lines(rdr: @mut StringReader, fn read_shebang_comment(rdr: @mut StringReader, code_to_the_left: bool, comments: &mut ~[cmnt]) { - debug2!(">>> shebang comment"); + debug!(">>> shebang comment"); let p = rdr.last_pos; - debug2!("<<< shebang comment"); + debug!("<<< shebang comment"); comments.push(cmnt { style: if code_to_the_left { trailing } else { isolated }, lines: ~[read_one_line_comment(rdr)], @@ -191,19 +191,19 @@ fn read_shebang_comment(rdr: @mut StringReader, code_to_the_left: bool, fn read_line_comments(rdr: @mut StringReader, code_to_the_left: bool, comments: &mut ~[cmnt]) { - debug2!(">>> line comments"); + debug!(">>> line comments"); let p = rdr.last_pos; let mut lines: ~[~str] = ~[]; while rdr.curr == '/' && nextch(rdr) == '/' { let line = read_one_line_comment(rdr); - debug2!("{}", line); + debug!("{}", line); if is_doc_comment(line) { // doc-comments are not put in comments break; } lines.push(line); consume_non_eol_whitespace(rdr); } - debug2!("<<< line comments"); + debug!("<<< line comments"); if !lines.is_empty() { comments.push(cmnt { style: if code_to_the_left { trailing } else { isolated }, @@ -242,14 +242,14 @@ fn trim_whitespace_prefix_and_push_line(lines: &mut ~[~str], } None => s, }; - debug2!("pushing line: {}", s1); + debug!("pushing line: {}", s1); lines.push(s1); } fn read_block_comment(rdr: @mut StringReader, code_to_the_left: bool, comments: &mut ~[cmnt]) { - debug2!(">>> block comment"); + debug!(">>> block comment"); let p = rdr.last_pos; let mut lines: ~[~str] = ~[]; let col: CharPos = rdr.col; @@ -275,7 +275,7 @@ fn read_block_comment(rdr: @mut StringReader, } else { let mut level: int = 1; while level > 0 { - debug2!("=== block comment level {}", level); + debug!("=== block comment level {}", level); if is_eof(rdr) { (rdr as @mut reader).fatal(~"unterminated block comment"); } @@ -311,7 +311,7 @@ fn read_block_comment(rdr: @mut StringReader, if !is_eof(rdr) && rdr.curr != '\n' && lines.len() == 1u { style = mixed; } - debug2!("<<< block comment"); + debug!("<<< block comment"); comments.push(cmnt {style: style, lines: lines, pos: p}); } @@ -324,15 +324,15 @@ fn peeking_at_comment(rdr: @mut StringReader) -> bool { fn consume_comment(rdr: @mut StringReader, code_to_the_left: bool, comments: &mut ~[cmnt]) { - debug2!(">>> consume comment"); + debug!(">>> consume comment"); if rdr.curr == '/' && nextch(rdr) == '/' { read_line_comments(rdr, code_to_the_left, comments); } else if rdr.curr == '/' && nextch(rdr) == '*' { read_block_comment(rdr, code_to_the_left, comments); } else if rdr.curr == '#' && nextch(rdr) == '!' { read_shebang_comment(rdr, code_to_the_left, comments); - } else { fail2!(); } - debug2!("<<< consume comment"); + } else { fail!(); } + debug!("<<< consume comment"); } #[deriving(Clone)] @@ -378,11 +378,11 @@ pub fn gather_comments_and_literals(span_diagnostic: let TokenAndSpan {tok: tok, sp: sp} = rdr.peek(); if token::is_lit(&tok) { do with_str_from(rdr, bstart) |s| { - debug2!("tok lit: {}", s); + debug!("tok lit: {}", s); literals.push(lit {lit: s.to_owned(), pos: sp.lo}); } } else { - debug2!("tok: {}", token::to_str(get_ident_interner(), &tok)); + debug!("tok: {}", token::to_str(get_ident_interner(), &tok)); } first_read = false; } |
