mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 13:29:12 +00:00 
			
		
		
		
	Synced RTLIL::unescape_id() to log_id() behavior
This commit is contained in:
		
							parent
							
								
									bedd46338f
								
							
						
					
					
						commit
						cb9d0a414d
					
				
					 1 changed files with 9 additions and 3 deletions
				
			
		| 
						 | 
					@ -267,9 +267,15 @@ namespace RTLIL
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	static inline std::string unescape_id(std::string str) {
 | 
						static inline std::string unescape_id(std::string str) {
 | 
				
			||||||
		if (str.size() > 1 && str[0] == '\\' && str[1] != '$')
 | 
							if (str.size() < 2)
 | 
				
			||||||
			return str.substr(1);
 | 
								return str;
 | 
				
			||||||
		return str;
 | 
							if (str[0] != '\\')
 | 
				
			||||||
 | 
								return str;
 | 
				
			||||||
 | 
							if (str[1] == '$' || str[1] == '\\')
 | 
				
			||||||
 | 
								return str;
 | 
				
			||||||
 | 
							if (str[1] >= '0' && str[1] <= '9')
 | 
				
			||||||
 | 
								return str;
 | 
				
			||||||
 | 
							return str.substr(1);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	static inline std::string unescape_id(RTLIL::IdString str) {
 | 
						static inline std::string unescape_id(RTLIL::IdString str) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue