mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	Fixed line numbers when using here-doc macros
This commit is contained in:
		
							parent
							
								
									85e3cc12ac
								
							
						
					
					
						commit
						6d56172c0d
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		|  | @ -343,10 +343,15 @@ std::string frontend_verilog_preproc(FILE *f, std::string filename, const std::m | ||||||
| 				} else { | 				} else { | ||||||
| 					if (state != 2) | 					if (state != 2) | ||||||
| 						state = 3; | 						state = 3; | ||||||
| 					if (tok == "\n" && !here_doc_mode) { | 					if (tok == "\n") { | ||||||
| 						return_char('\n'); | 						if (here_doc_mode) { | ||||||
| 						break; | 							value += " "; | ||||||
| 					} | 							newline_count++; | ||||||
|  | 						} else { | ||||||
|  | 							return_char('\n'); | ||||||
|  | 							break; | ||||||
|  | 						} | ||||||
|  | 					} else | ||||||
| 					if (tok == "\\") { | 					if (tok == "\\") { | ||||||
| 						char ch = next_char(); | 						char ch = next_char(); | ||||||
| 						if (ch == '\n') { | 						if (ch == '\n') { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue