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

.key_type

This commit is contained in:
Alexander Medvednikov
2019-07-16 12:17:17 +02:00
parent 961ffb1868
commit 0a4a9a35c3
2 changed files with 11 additions and 7 deletions

View File

@ -98,7 +98,7 @@ enum Token {
key_struct
key_switch
key_true
typ
key_type
//typeof
key_orelse
key_union
@ -189,7 +189,7 @@ fn build_token_str() []string {
s[Token.key_goto] = 'goto'
s[Token.key_const] = 'const'
s[Token.key_mut] = 'mut'
s[Token.typ] = 'type'
s[Token.key_type] = 'type'
s[Token.key_for] = 'for'
s[Token.key_switch] = 'switch'
//Tokens[MATCH] = 'match'
@ -242,7 +242,7 @@ fn (t Token) is_decl() bool {
//return t in [.key_enum, .key_interface, .func, .typ, .key_const,
//.key_import_const, .key_struct, .key_pub, .eof]
return t == .key_enum || t == .key_interface || t == .func ||
t == .key_struct || t == .typ ||
t == .key_struct || t == .key_type ||
t == .key_const || t == .key_import_const || t == .key_pub || t == .eof
}