1
0
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:
Nicolas Sauzede
2020-02-05 06:12:33 +01:00
committed by GitHub
parent c595c9eee1
commit 9d4c943d64
3 changed files with 27 additions and 0 deletions

View File

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