mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: add very simple nameof token to get type name as string
This commit is contained in:
@ -110,6 +110,7 @@ enum TokenKind {
|
||||
key_select
|
||||
key_sizeof
|
||||
key_offsetof
|
||||
key_nameof
|
||||
key_struct
|
||||
key_switch
|
||||
key_true
|
||||
@ -240,6 +241,7 @@ fn build_token_str() []string {
|
||||
s[TokenKind.key_select] = 'select'
|
||||
s[TokenKind.key_none] = 'none'
|
||||
s[TokenKind.key_offsetof] = '__offsetof'
|
||||
s[TokenKind.key_nameof] = 'nameof'
|
||||
return s
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user