Generate wrapper code for this module/header code block

Property definitions

nitc $ FFILanguage :: compile_module_block
	# Generate wrapper code for this module/header code block
	fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule) is abstract
src/ffi/light_ffi_base.nit:120,2--121,103

nitc $ CLanguage :: compile_module_block
	redef fun compile_module_block(block, ecc, mmodule)
	do
		if block.is_c_header then
			ecc.header_custom.add block.location.as_line_pragma
			ecc.header_custom.add "\n"
			ecc.header_custom.add block.code
		else if block.is_c_body then
			ecc.body_impl.add block.location.as_line_pragma
			ecc.body_impl.add "\n"
			ecc.body_impl.add block.code
		end
	end
src/ffi/light_c.nit:33,2--44,4

nitc $ CPPLanguage :: compile_module_block
	redef fun compile_module_block(block, ecc, mmodule)
	do
		if mmodule.cpp_file == null then mmodule.cpp_file = new CPPCompilationUnit

		if block.is_cpp_header then
			mmodule.cpp_file.header_custom.add(block.location.as_line_pragma)
			mmodule.cpp_file.header_custom.add(block.code)
		else if block.is_cpp_body then
			mmodule.cpp_file.body_custom.add( block.location.as_line_pragma )
			mmodule.cpp_file.body_custom.add( block.code )
		end
	end
src/ffi/cpp.nit:39,2--50,4

nitc $ JavaLanguage :: compile_module_block
	redef fun compile_module_block(block, ccu, mmodule)
	do
		mmodule.ensure_java_files
		var java_file = mmodule.java_file
		assert java_file != null

		if block.is_inner_java then
			java_file.class_content.add(block.code)
		else java_file.header.add(block.code)
	end
src/ffi/java.nit:35,2--44,4