From 424bd1c4655f5351f901ad20b19a1409917c4461 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sat, 14 Mar 2020 05:22:59 +0800 Subject: [PATCH] scanner: minor optimization --- vlib/compiler/scanner.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/compiler/scanner.v b/vlib/compiler/scanner.v index 83d968cf14..2a31860d20 100644 --- a/vlib/compiler/scanner.v +++ b/vlib/compiler/scanner.v @@ -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 } -