aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/classes.rs
diff options
context:
space:
mode:
authorChristopher Durham <[email protected]>2018-01-27 23:51:12 +0000
committerGitHub <[email protected]>2018-01-27 23:51:12 +0000
commite6e61251abb68b3e6a47fd3708f4dea6059a9ec3 (patch)
treec22cfa06a26add11f3aefca3806f0009dd25d923 /src/lexer/classes.rs
parent357cd3358167daa38f3ff34d225e1501faff6015 (diff)
parent9140b3e7286efae57ee8c49c7bfcad8737f9c6fc (diff)
Merge pull request #12 from CAD97/enforce-fmt
Enforce rustfmt format
Diffstat (limited to 'src/lexer/classes.rs')
-rw-r--r--src/lexer/classes.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lexer/classes.rs b/src/lexer/classes.rs
index 4235d2648..7fed008af 100644
--- a/src/lexer/classes.rs
+++ b/src/lexer/classes.rs
@@ -1,17 +1,12 @@
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') 4 (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'
5 || (c >= 'A' && c <= 'Z')
6 || c == '_'
7 || (c > '\x7f' && UnicodeXID::is_xid_start(c)) 5 || (c > '\x7f' && UnicodeXID::is_xid_start(c))
8} 6}
9 7
10pub fn is_ident_continue(c: char) -> bool { 8pub fn is_ident_continue(c: char) -> bool {
11 (c >= 'a' && c <= 'z') 9 (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_'
12 || (c >= 'A' && c <= 'Z')
13 || (c >= '0' && c <= '9')
14 || c == '_'
15 || (c > '\x7f' && UnicodeXID::is_xid_continue(c)) 10 || (c > '\x7f' && UnicodeXID::is_xid_continue(c))
16} 11}
17 12