mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: __offsetof keyword for C offsetof() macro
This commit is contained in:

committed by
Alexander Medvednikov

parent
31b7991a93
commit
8512c9fc9d
@ -108,6 +108,7 @@ enum TokenKind {
|
||||
key_return
|
||||
key_select
|
||||
key_sizeof
|
||||
key_offsetof
|
||||
key_struct
|
||||
key_switch
|
||||
key_true
|
||||
@ -237,11 +238,12 @@ fn build_token_str() []string {
|
||||
s[TokenKind.key_match] = 'match'
|
||||
s[TokenKind.key_select] = 'select'
|
||||
s[TokenKind.key_none] = 'none'
|
||||
s[TokenKind.key_offsetof] = '__offsetof'
|
||||
return s
|
||||
}
|
||||
|
||||
const (
|
||||
NrTokens = 140
|
||||
NrTokens = 141
|
||||
TokenStr = build_token_str()
|
||||
KEYWORDS = build_keys()
|
||||
)
|
||||
|
Reference in New Issue
Block a user