From 56a9196be8e84dcd31bce00a40cf9b20e3618b05 Mon Sep 17 00:00:00 2001 From: yuyi Date: Wed, 1 Apr 2020 18:12:25 +0800 Subject: [PATCH] token: fix nr_tokens --- vlib/v/token/token.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/v/token/token.v b/vlib/v/token/token.v index a6de64dda0..c45506722e 100644 --- a/vlib/v/token/token.v +++ b/vlib/v/token/token.v @@ -121,13 +121,15 @@ pub enum Kind { key_static key_unsafe keyword_end + + _end_ } const ( assign_tokens = [Kind.assign, .plus_assign, .minus_assign, .mult_assign, .div_assign, .xor_assign, .mod_assign, .or_assign, .and_assign, .right_shift_assign, .left_shift_assign] - nr_tokens = 141 + nr_tokens = int(Kind._end_) ) // build_keys genereates a map with keywords' string values: // Keywords['return'] == .key_return