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

scanner: fill out '@FN' placeholder at compile time while scanning

This commit is contained in:
Larpon
2020-05-16 14:20:19 +02:00
committed by GitHub
parent 7a404af097
commit aa30549337
3 changed files with 54 additions and 1 deletions

View File

@@ -7,6 +7,11 @@ fn is_name_char(c byte) bool {
return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || c == `_`
}
[inline]
fn is_func_char(c byte) bool {
return (c >= `a` && c <= `z`) || (c >= `A` && c <= `Z`) || c == `_` || c.is_digit()
}
[inline]
fn is_nl(c byte) bool {
return c == `\r` || c == `\n`