scanner: minor optimization

pull/4020/head
yuyi 2020-03-14 05:22:59 +08:00 committed by GitHub
parent 19f9c18305
commit 424bd1c465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -968,7 +968,7 @@ fn (s Scanner) line(n int) string {
} }
fn is_name_char(c byte) bool { fn is_name_char(c byte) bool {
return c == `_` || c.is_letter() return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || c == `_`
} }
[inline] [inline]
@ -998,4 +998,3 @@ fn good_type_name(s string) bool {
} }
return true return true
} }