1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

scanner: minor optimization

This commit is contained in:
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

View File

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