about summary refs log tree commit diff
path: root/src/comp/syntax/parse
diff options
context:
space:
mode:
authorKevin Cantu <me@kevincantu.org>2012-02-23 01:44:04 -0800
committerMarijn Haverbeke <marijnh@gmail.com>2012-02-23 17:00:19 +0100
commit7782f5d6926be7970ec474b74302f2298ceccd13 (patch)
treec05d8ace8e1398de239c130643d18c1bc5e77d81 /src/comp/syntax/parse
parent1b957c0942007e60ec9ea6773c964ea7bdc199af (diff)
downloadrust-7782f5d6926be7970ec474b74302f2298ceccd13.tar.gz
rust-7782f5d6926be7970ec474b74302f2298ceccd13.zip
(core::str) remove len_bytes alias
Diffstat (limited to 'src/comp/syntax/parse')
-rw-r--r--src/comp/syntax/parse/lexer.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/comp/syntax/parse/lexer.rs b/src/comp/syntax/parse/lexer.rs
index 0328afc9f20..86d925e87e6 100644
--- a/src/comp/syntax/parse/lexer.rs
+++ b/src/comp/syntax/parse/lexer.rs
@@ -64,7 +64,7 @@ fn new_reader(cm: codemap::codemap,
               itr: @interner::interner<str>) -> reader {
     let r = @{cm: cm,
               span_diagnostic: span_diagnostic,
-              src: filemap.src, len: str::len_bytes(*filemap.src),
+              src: filemap.src, len: str::len(*filemap.src),
               mutable col: 0u, mutable pos: 0u, mutable curr: -1 as char,
               mutable chpos: filemap.start_pos.ch, mutable strs: [],
               filemap: filemap, interner: itr};
@@ -163,7 +163,7 @@ fn scan_exponent(rdr: reader) -> option<str> {
             rdr.bump();
         }
         let exponent = scan_digits(rdr, 10u);
-        if str::len_bytes(exponent) > 0u {
+        if str::len(exponent) > 0u {
             ret some(rslt + exponent);
         } else { rdr.fatal("scan_exponent: bad fp literal"); }
     } else { ret none::<str>; }
@@ -226,7 +226,7 @@ fn scan_number(c: char, rdr: reader) -> token::token {
             tp = if signed { either::left(ast::ty_i64) }
                       else { either::right(ast::ty_u64) };
         }
-        if str::len_bytes(num_str) == 0u {
+        if str::len(num_str) == 0u {
             rdr.fatal("no valid digits found for number");
         }
         let parsed = option::get(u64::from_str(num_str, base as u64));
@@ -273,7 +273,7 @@ fn scan_number(c: char, rdr: reader) -> token::token {
         ret token::LIT_FLOAT(interner::intern(*rdr.interner, num_str),
                              ast::ty_f);
     } else {
-        if str::len_bytes(num_str) == 0u {
+        if str::len(num_str) == 0u {
             rdr.fatal("no valid digits found for number");
         }
         let parsed = option::get(u64::from_str(num_str, base as u64));
@@ -610,8 +610,8 @@ fn trim_whitespace_prefix_and_push_line(&lines: [str],
                                         s: str, col: uint) unsafe {
     let s1;
     if all_whitespace(s, 0u, col) {
-        if col < str::len_bytes(s) {
-            s1 = str::slice(s, col, str::len_bytes(s));
+        if col < str::len(s) {
+            s1 = str::slice(s, col, str::len(s));
         } else { s1 = ""; }
     } else { s1 = s; }
     log(debug, "pushing line: " + s1);
@@ -651,7 +651,7 @@ fn read_block_comment(rdr: reader, code_to_the_left: bool) -> cmnt {
             }
         }
     }
-    if str::len_bytes(curr_line) != 0u {
+    if str::len(curr_line) != 0u {
         trim_whitespace_prefix_and_push_line(lines, curr_line, col);
     }
     let style = if code_to_the_left { trailing } else { isolated };