Skip to content

Commit c64b6d0

Browse files
committed
---
yaml --- r: 56498 b: refs/heads/auto c: 3c10a94 h: refs/heads/master v: v3
1 parent 6345ae2 commit c64b6d0

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 5411cbf656b42ef1d8a95e9de1a50bea616f7c56
17+
refs/heads/auto: 3c10a9412e2b1668bfe348f4728eedc2de0c642a
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libsyntax/parse/lexer.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,20 +225,12 @@ pub fn is_whitespace(c: char) -> bool {
225225
return c == ' ' || c == '\t' || c == '\r' || c == '\n';
226226
}
227227

228-
fn may_begin_ident(c: char) -> bool { return is_alpha(c) || c == '_'; }
229-
230228
fn in_range(c: char, lo: char, hi: char) -> bool {
231229
return lo <= c && c <= hi
232230
}
233231

234-
fn is_alpha(c: char) -> bool {
235-
return in_range(c, 'a', 'z') || in_range(c, 'A', 'Z');
236-
}
237-
238232
fn is_dec_digit(c: char) -> bool { return in_range(c, '0', '9'); }
239233

240-
fn is_alnum(c: char) -> bool { return is_alpha(c) || is_dec_digit(c); }
241-
242234
fn is_hex_digit(c: char) -> bool {
243235
return in_range(c, '0', '9') || in_range(c, 'a', 'f') ||
244236
in_range(c, 'A', 'F');
@@ -444,8 +436,7 @@ fn scan_number(c: char, rdr: @mut StringReader) -> token::Token {
444436
}
445437
}
446438
let mut is_float = false;
447-
if rdr.curr == '.' && !(is_alpha(nextch(rdr)) || nextch(rdr) == '_' ||
448-
nextch(rdr) == '.') {
439+
if rdr.curr == '.' && !(ident_start(nextch(rdr)) || nextch(rdr) == '.') {
449440
is_float = true;
450441
bump(rdr);
451442
let dec_part = scan_digits(rdr, 10u);

0 commit comments

Comments
 (0)