From 5a3d26f271a39212de90544e7394c29373dc5bab Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 8 Jan 2013 08:44:31 -0800 Subject: core: replace unicode match exprs with bsearch in const arrays, minor perf win. --- src/libsyntax/parse/lexer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax/parse') 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 -- cgit 1.4.1-3-g733a5