From 4812f928456652ac830134dcec80bb669da8b353 Mon Sep 17 00:00:00 2001 From: drswinghead Date: Wed, 26 Jun 2019 19:54:03 +0800 Subject: [PATCH] avoid literal number #651 --- compiler/scanner.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/scanner.v b/compiler/scanner.v index 782d42cd91..b408a8436d 100644 --- a/compiler/scanner.v +++ b/compiler/scanner.v @@ -60,8 +60,7 @@ fn is_white(c byte) bool { } fn is_nl(c byte) bool { - i := int(c) - return i == 12 || i == 10 + return c == `\r` || c == `\n` } fn (s mut Scanner) ident_name() string {