vfmt: fix eating .zlib in `$embed_file('v.png', .zlib)` (#12794)
							parent
							
								
									7c7cdf8ce7
								
							
						
					
					
						commit
						9bf777c1ee
					
				| 
						 | 
				
			
			@ -1700,7 +1700,11 @@ pub fn (mut f Fmt) comptime_call(node ast.ComptimeCall) {
 | 
			
		|||
		}
 | 
			
		||||
	} else {
 | 
			
		||||
		if node.is_embed {
 | 
			
		||||
			f.write("\$embed_file('$node.embed_file.rpath')")
 | 
			
		||||
			if node.embed_file.compression_type == 'none' {
 | 
			
		||||
				f.write("\$embed_file('$node.embed_file.rpath')")
 | 
			
		||||
			} else {
 | 
			
		||||
				f.write("\$embed_file('$node.embed_file.rpath', .$node.embed_file.compression_type)")
 | 
			
		||||
			}
 | 
			
		||||
		} else if node.is_env {
 | 
			
		||||
			f.write("\$env('$node.args_var')")
 | 
			
		||||
		} else if node.is_pkgconfig {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,4 +5,5 @@ fn main() {
 | 
			
		|||
	eprintln('content: ${ptr_str(content)}')
 | 
			
		||||
	eprintln(unsafe { the_png.data().vbytes(the_png.len) }.hex())
 | 
			
		||||
	println(the_png)
 | 
			
		||||
	the_other_png := $embed_file('v.png', .zlib)
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue