mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	Fixed parsing of module arguments when one type is used for many args
This commit is contained in:
		
							parent
							
								
									63285b300c
								
							
						
					
					
						commit
						0dfdbd991a
					
				
					 1 changed files with 10 additions and 3 deletions
				
			
		|  | @ -248,9 +248,16 @@ optional_comma: | ||||||
| 
 | 
 | ||||||
| module_arg: | module_arg: | ||||||
| 	TOK_ID range { | 	TOK_ID range { | ||||||
| 		if (port_stubs.count(*$1) != 0) | 		if (ast_stack.back()->children.size() > 0 && ast_stack.back()->children.back()->type == AST_WIRE) { | ||||||
| 			frontend_verilog_yyerror("Duplicate module port `%s'.", $1->c_str()); | 			AstNode *node = ast_stack.back()->children.back()->clone(); | ||||||
| 		port_stubs[*$1] = ++port_counter; | 			node->str = *$1; | ||||||
|  | 			node->port_id = ++port_counter; | ||||||
|  | 			ast_stack.back()->children.push_back(node); | ||||||
|  | 		} else { | ||||||
|  | 			if (port_stubs.count(*$1) != 0) | ||||||
|  | 				frontend_verilog_yyerror("Duplicate module port `%s'.", $1->c_str()); | ||||||
|  | 			port_stubs[*$1] = ++port_counter; | ||||||
|  | 		} | ||||||
| 		if ($2 != NULL) | 		if ($2 != NULL) | ||||||
| 			delete $2; | 			delete $2; | ||||||
| 		delete $1; | 		delete $1; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue