cgen: add `nil` to c_reserved (it is a macro defined in MacTypes.h on macos)

pull/13873/head
Delyan Angelov 2022-03-30 13:32:56 +03:00
parent 093994655c
commit 566735b298
1 changed files with 4 additions and 4 deletions

View File

@ -21,10 +21,10 @@ const (
c_reserved = ['array', 'auto', 'bool', 'break', 'calloc', 'case', 'char', 'class', 'complex',
'const', 'continue', 'default', 'delete', 'do', 'double', 'else', 'enum', 'error', 'exit',
'export', 'extern', 'false', 'float', 'for', 'free', 'goto', 'if', 'inline', 'int', 'link',
'long', 'malloc', 'namespace', 'new', 'panic', 'register', 'restrict', 'return', 'short',
'signed', 'sizeof', 'static', 'string', 'struct', 'switch', 'typedef', 'typename', 'union',
'unix', 'unsigned', 'void', 'volatile', 'while', 'template', 'true', 'small', 'stdout',
'stdin', 'stderr']
'long', 'malloc', 'namespace', 'new', 'nil', 'panic', 'register', 'restrict', 'return',
'short', 'signed', 'sizeof', 'static', 'string', 'struct', 'switch', 'typedef', 'typename',
'union', 'unix', 'unsigned', 'void', 'volatile', 'while', 'template', 'true', 'small',
'stdout', 'stdin', 'stderr']
c_reserved_map = string_array_to_map(c_reserved)
// same order as in token.Kind
cmp_str = ['eq', 'ne', 'gt', 'lt', 'ge', 'le']