1
0
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:
Emily Hudson
2019-12-21 21:46:09 +00:00
committed by Alexander Medvednikov
parent 31b7991a93
commit 8512c9fc9d
4 changed files with 23 additions and 2 deletions

View File

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