aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/classes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lexer/classes.rs')
-rw-r--r--src/lexer/classes.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lexer/classes.rs b/src/lexer/classes.rs
index 7fed008af..4235d2648 100644
--- a/src/lexer/classes.rs
+++ b/src/lexer/classes.rs
@@ -1,12 +1,17 @@
1use unicode_xid::UnicodeXID; 1use unicode_xid::UnicodeXID;
2 2
3pub fn is_ident_start(c: char) -> bool { 3pub fn is_ident_start(c: char) -> bool {
4 (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' 4 (c >= 'a' && c <= 'z')
5 || (c >= 'A' && c <= 'Z')
6 || c == '_'
5 || (c > '\x7f' && UnicodeXID::is_xid_start(c)) 7 || (c > '\x7f' && UnicodeXID::is_xid_start(c))
6} 8}
7 9
8pub fn is_ident_continue(c: char) -> bool { 10pub fn is_ident_continue(c: char) -> bool {
9 (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_' 11 (c >= 'a' && c <= 'z')
12 || (c >= 'A' && c <= 'Z')
13 || (c >= '0' && c <= '9')
14 || c == '_'
10 || (c > '\x7f' && UnicodeXID::is_xid_continue(c)) 15 || (c > '\x7f' && UnicodeXID::is_xid_continue(c))
11} 16}
12 17