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

token: fix nr_tokens

This commit is contained in:
yuyi 2020-04-01 18:12:25 +08:00 committed by GitHub
parent b28e372106
commit 56a9196be8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,13 +121,15 @@ pub enum Kind {
key_static key_static
key_unsafe key_unsafe
keyword_end keyword_end
_end_
} }
const ( const (
assign_tokens = [Kind.assign, .plus_assign, .minus_assign, .mult_assign, assign_tokens = [Kind.assign, .plus_assign, .minus_assign, .mult_assign,
.div_assign, .xor_assign, .mod_assign, .or_assign, .and_assign, .div_assign, .xor_assign, .mod_assign, .or_assign, .and_assign,
.right_shift_assign, .left_shift_assign] .right_shift_assign, .left_shift_assign]
nr_tokens = 141 nr_tokens = int(Kind._end_)
) )
// build_keys genereates a map with keywords' string values: // build_keys genereates a map with keywords' string values:
// Keywords['return'] == .key_return // Keywords['return'] == .key_return