languages/gen_h.py
def create_union(self, name, decls):
		""" 
		Create union with declarations.
		Arguments:
			name	Union name
			decls	List with declarations contained within the union.
		"""
		self.__wr_line("{}union {} {}\n".format("	" * (decls[0].gap - 1),
							name, "{"))
		for decl in decls:	
			
			# Recursive
			if (type(decl) == list):
			
				# So far hardcoded that union contains structure for register
				# map... For future this will be changed with some kind of
				# joined type classification
				self.create_structure(name + "_s", decl)
			else:
				self.write_decl(decl)
		
		self.__wr_line("{}{};\n".format("	" * (decls[0].gap - 1), "}"))
 
		Create union with declarations.
		Arguments:
			name	Union name
			decls	List with declarations contained within the union.
		
Create union with declarations.
Arguments:
name    Union name
decls   List with declarations contained within the union.
Create union with declarations . Arguments : name Union name decls List with declarations contained within the union .
def create_union(self, name, decls):
		self.__wr_line("{}union {} {}\n".format("	" * (decls[0].gap - 1),
							name, "{"))
		for decl in decls:	
			if (type(decl) == list):
				self.create_structure(name + "_s", decl)
			else:
				self.write_decl(decl)
		self.__wr_line("{}{};\n".format("	" * (decls[0].gap - 1), "}"))
def create_union ( self , name , decls ) : self . __wr_line ( "{}union {} {}\n" . format ( "	" * ( decls [ 0 ] . gap - 1 ) , name , "{" ) ) for decl in decls : if ( type ( decl ) == list ) : self . create_structure ( name + "_s" , decl ) else : self . write_decl ( decl ) self . __wr_line ( "{}{};\n" . format ( "	" * ( decls [ 0 ] . gap - 1 ) , "}" ) )
Create union with declarations.
Create union with declarations .
""" 
		Create union with declarations.
		Arguments:
			name	Union name
			decls	List with declarations contained within the union.
		""" # Recursive # So far hardcoded that union contains structure for register # map... For future this will be changed with some kind of # joined type classification
self
name
decls