token: fix nr_tokens

pull/4174/head
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
1 changed files with 3 additions and 1 deletions

View File

@ -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