mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
scanner: small optimization
This commit is contained in:
parent
9bb1b5d1bb
commit
b28e372106
@ -994,8 +994,9 @@ fn (s Scanner) line(n int) string {
|
|||||||
return res.trim_right('\r\n').trim_left('\r\n')
|
return res.trim_right('\r\n').trim_left('\r\n')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[inline]
|
||||||
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]
|
||||||
|
Loading…
Reference in New Issue
Block a user