mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	cmdref: Export internal_flag to json
Commands flagged as internal will display a warning, just like experimental commands. Drop `passes/tests` group in favour of `internal` group, which is automatically assigned for any command without an assigned group which is flagged as internal.
This commit is contained in:
		
							parent
							
								
									d62a110dc8
								
							
						
					
					
						commit
						14fdc9e76c
					
				
					 5 changed files with 19 additions and 11 deletions
				
			
		|  | @ -53,6 +53,7 @@ class YosysCmd: | |||
|     source_line: int | ||||
|     source_func: str | ||||
|     experimental_flag: bool | ||||
|     internal_flag: bool | ||||
| 
 | ||||
|     def __init__( | ||||
|             self, | ||||
|  | @ -62,7 +63,8 @@ class YosysCmd: | |||
|             source_file: str = "", | ||||
|             source_line: int = 0, | ||||
|             source_func: str = "", | ||||
|             experimental_flag: bool = False | ||||
|             experimental_flag: bool = False, | ||||
|             internal_flag: bool = False, | ||||
|     ) -> None: | ||||
|         self.name = name | ||||
|         self.title = title | ||||
|  | @ -72,6 +74,7 @@ class YosysCmd: | |||
|         self.source_line = source_line | ||||
|         self.source_func = source_func | ||||
|         self.experimental_flag = experimental_flag | ||||
|         self.internal_flag = internal_flag | ||||
|      | ||||
| class YosysCmdGroupDocumenter(Documenter): | ||||
|     objtype = 'cmdgroup' | ||||
|  | @ -344,6 +347,10 @@ class YosysCmdDocumenter(YosysCmdGroupDocumenter): | |||
|             self.add_line(f'.. warning:: This command is experimental', source_name, source_line) | ||||
|             self.add_line('\n', source_name) | ||||
| 
 | ||||
|         if self.object.internal_flag: | ||||
|             self.add_line(f'.. warning:: This command is intended for internal developer use only', source_name, source_line) | ||||
|             self.add_line('\n', source_name) | ||||
| 
 | ||||
|         def render(content_list: YosysCmdContentListing, indent: int=0): | ||||
|             content_source = content_list.source_file or source_name | ||||
|             indent_str = '   '*indent | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue