scanner: small optimization
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