parameters: (self, node)
return_statement: return tsk
docstring: Compile *D* files. To get .di files as well as .o files, set the following::
  
  		def build(bld):
  			bld.program(source='foo.d', target='app', generate_headers=True)
docstring_summary: Compile *D* files. To get .di files as well as .o files, set the following::
docstring_tokens: Compile * D * files . To get . di files as well as . o files set the following ::
function: def d_hook(self, node):
  	"""
  	Compile *D* files. To get .di files as well as .o files, set the following::
  
  		def build(bld):
  			bld.program(source='foo.d', target='app', generate_headers=True)
  
  	"""
  	ext = Utils.destos_to_binfmt(self.env.DEST_OS) == 'pe' and 'obj' or 'o'
  	out = '%s.%d.%s' % (node.name, self.idx, ext)
  	def create_compiled_task(self, name, node):
  		task = self.create_task(name, node, node.parent.find_or_declare(out))
  		try:
  			self.compiled_tasks.append(task)
  		except AttributeError:
  			self.compiled_tasks = [task]
  		return task
  
  	if getattr(self, 'generate_headers', None):
  		tsk = create_compiled_task(self, 'd_with_header', node)
  		tsk.outputs.append(node.change_ext(self.env['DHEADER_ext']))
  	else:
  		tsk = create_compiled_task(self, 'd', node)
  	return tsk
function_tokens: def d_hook ( self , node ) : ext = Utils . destos_to_binfmt ( self . env . DEST_OS ) == 'pe' and 'obj' or 'o' out = '%s.%d.%s' % ( node . name , self . idx , ext ) def create_compiled_task ( self , name , node ) : task = self . create_task ( name , node , node . parent . find_or_declare ( out ) ) try : self . compiled_tasks . append ( task ) except AttributeError : self . compiled_tasks = [ task ] return task if getattr ( self , 'generate_headers' , None ) : tsk = create_compiled_task ( self , 'd_with_header' , node ) tsk . outputs . append ( node . change_ext ( self . env [ 'DHEADER_ext' ] ) ) else : tsk = create_compiled_task ( self , 'd' , node ) return tsk