mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: add "case" to c_reserved
This commit is contained in:
parent
1a2ae0aead
commit
bfee8a528c
@ -15,9 +15,11 @@ import v.depgraph
|
|||||||
// NB: keywords after 'new' are reserved in C++
|
// NB: keywords after 'new' are reserved in C++
|
||||||
const (
|
const (
|
||||||
c_reserved = ['delete', 'exit', 'link', 'unix', 'error', 'calloc', 'malloc', 'free', 'panic',
|
c_reserved = ['delete', 'exit', 'link', 'unix', 'error', 'calloc', 'malloc', 'free', 'panic',
|
||||||
'auto', 'char', 'default', 'do', 'double', 'extern', 'float', 'inline', 'int', 'long',
|
'case', 'auto', 'char', 'default', 'do', 'double', 'extern', 'float', 'inline', 'int',
|
||||||
'register', 'restrict', 'short', 'signed', 'sizeof', 'static', 'switch', 'typedef', 'union',
|
'long', 'register', 'restrict', 'short', 'signed', 'sizeof', 'static', 'switch', 'typedef',
|
||||||
'unsigned', 'void', 'volatile', 'while', 'new', 'namespace', 'class', 'typename', 'export']
|
'union', 'unsigned', 'void', 'volatile', 'while', 'new', 'namespace', 'class', 'typename',
|
||||||
|
'export',
|
||||||
|
]
|
||||||
// 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']
|
||||||
// when operands are switched
|
// when operands are switched
|
||||||
|
Loading…
Reference in New Issue
Block a user