diff options
| author | bors <bors@rust-lang.org> | 2013-04-19 23:03:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-04-19 23:03:52 -0700 |
| commit | ce4f73a243de147c2c5b9b9822a71dafbca97a51 (patch) | |
| tree | d1097cda04b3e4a4f40e673903ebd2200d98decc /src/libsyntax/parse | |
| parent | e67f1c0fd229ab9f106c17f3b690dc6059eaeef0 (diff) | |
| parent | 5a3d26f271a39212de90544e7394c29373dc5bab (diff) | |
| download | rust-ce4f73a243de147c2c5b9b9822a71dafbca97a51.tar.gz rust-ce4f73a243de147c2c5b9b9822a71dafbca97a51.zip | |
auto merge of #5945 : graydon/rust/fix-unicode-tables, r=pcwalton
This switches the unicode functions in core to use static character-range tables and a binary search helper rather than open-coded switch statements. It adds about 50k of read only data to the libcore binary but cuts out a similar amount of compiled IR. Would have done it this way in the first place but we didn't have structured statics for a long time.
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 |
