diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2013-01-08 08:44:31 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2013-04-18 14:39:40 -0700 |
| commit | 5a3d26f271a39212de90544e7394c29373dc5bab (patch) | |
| tree | 3de0d497d9283356561e38137f635aee87656407 /src/libsyntax/parse | |
| parent | 14b7277c4fe6fe7ef26a28931962d8557e2670a7 (diff) | |
| download | rust-5a3d26f271a39212de90544e7394c29373dc5bab.tar.gz rust-5a3d26f271a39212de90544e7394c29373dc5bab.zip | |
core: replace unicode match exprs with bsearch in const arrays, minor perf win.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/lexer.rs b/src/libsyntax/parse/lexer.rs index bc930515a5d..a9edf12f7fa 100644 --- a/src/libsyntax/parse/lexer.rs +++ b/src/libsyntax/parse/lexer.rs @@ -535,7 +535,7 @@ fn ident_start(c: char) -> bool { (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' - || (c > 'z' && char::is_XID_start(c)) + || (c > '\x7f' && char::is_XID_start(c)) } fn ident_continue(c: char) -> bool { @@ -543,7 +543,7 @@ fn ident_continue(c: char) -> bool { || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_' - || (c > 'z' && char::is_XID_continue(c)) + || (c > '\x7f' && char::is_XID_continue(c)) } // return the next token from the string |
