1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: C enums + another enum simplification

This commit is contained in:
Alexander Medvednikov
2019-11-06 04:43:13 +03:00
parent 91bb969ed1
commit 855a736a2c
6 changed files with 31 additions and 26 deletions

View File

@@ -201,11 +201,12 @@ fn (p mut Parser) chash() {
}
if hash.starts_with('include') {
if p.first_pass() && !p.is_vh {
/*
if !p.pref.building_v && !p.fileis('vlib') {
p.warn('C #includes will soon be removed from the language' +
'\ndefine the C structs and functions in V')
}
*/
if p.file_pcguard.len != 0 {
//println('p: $p.file_platform $p.file_pcguard')
p.cgen.includes << '$p.file_pcguard\n#$hash\n#endif'