mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: add small
to c_reserved
This commit is contained in:
parent
cde0cbd5ad
commit
24bc2ae406
@ -16,12 +16,13 @@ import sync.pool
|
|||||||
const (
|
const (
|
||||||
// NB: some of the words in c_reserved, are not reserved in C,
|
// NB: some of the words in c_reserved, are not reserved in C,
|
||||||
// but are in C++, or have special meaning in V, thus need escaping too.
|
// but are in C++, or have special meaning in V, thus need escaping too.
|
||||||
|
// `small` should not be needed, but see: https://stackoverflow.com/questions/5874215/what-is-rpcndr-h
|
||||||
c_reserved = ['array', 'auto', 'break', 'calloc', 'case', 'char', 'class', 'const',
|
c_reserved = ['array', 'auto', 'break', 'calloc', 'case', 'char', 'class', 'const',
|
||||||
'continue', 'default', 'delete', 'do', 'double', 'else', 'enum', 'error', 'exit', 'export',
|
'continue', 'default', 'delete', 'do', 'double', 'else', 'enum', 'error', 'exit', 'export',
|
||||||
'extern', 'float', 'for', 'free', 'goto', 'if', 'inline', 'int', 'link', 'long', 'malloc',
|
'extern', 'float', 'for', 'free', 'goto', 'if', 'inline', 'int', 'link', 'long', 'malloc',
|
||||||
'namespace', 'new', 'panic', 'register', 'restrict', 'return', 'short', 'signed', 'sizeof',
|
'namespace', 'new', 'panic', 'register', 'restrict', 'return', 'short', 'signed', 'sizeof',
|
||||||
'static', 'string', 'struct', 'switch', 'typedef', 'typename', 'union', 'unix', 'unsigned',
|
'static', 'string', 'struct', 'switch', 'typedef', 'typename', 'union', 'unix', 'unsigned',
|
||||||
'void', 'volatile', 'while', 'template', 'stdout', 'stdin', 'stderr']
|
'void', 'volatile', 'while', 'template', 'small', 'stdout', 'stdin', 'stderr']
|
||||||
c_reserved_map = string_array_to_map(c_reserved)
|
c_reserved_map = string_array_to_map(c_reserved)
|
||||||
// same order as in token.Kind
|
// same order as in token.Kind
|
||||||
cmp_str = ['eq', 'ne', 'gt', 'lt', 'ge', 'le']
|
cmp_str = ['eq', 'ne', 'gt', 'lt', 'ge', 'le']
|
||||||
|
Loading…
Reference in New Issue
Block a user