#include warning
							parent
							
								
									7fc7c05e9d
								
							
						
					
					
						commit
						1b5f724df0
					
				| 
						 | 
				
			
			@ -201,6 +201,11 @@ 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'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,6 +37,11 @@ fn (p mut Parser) struct_decl() {
 | 
			
		|||
	}
 | 
			
		||||
	is_c := name == 'C' && p.tok == .dot
 | 
			
		||||
	if is_c {
 | 
			
		||||
		if !p.pref.building_v && !p.fileis('vlib') {
 | 
			
		||||
			p.warn('Virtual C structs will soon be removed from the language' +
 | 
			
		||||
			'\ndefine the C structs and functions in V')
 | 
			
		||||
		}
 | 
			
		||||
				
 | 
			
		||||
		p.check(.dot)
 | 
			
		||||
		name = p.check_name()
 | 
			
		||||
		cat = .c_struct
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue