mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 19:42:43 +00:00 
			
		
		
		
	CodeGenerators: Ensure that we always print the entire generated output
This commit is contained in:
		
							parent
							
								
									e007279315
								
							
						
					
					
						commit
						8032724574
					
				
					 17 changed files with 37 additions and 74 deletions
				
			
		|  | @ -213,8 +213,7 @@ static ErrorOr<void> generate_emoji_data_header(Core::BufferedFile& file, EmojiD | |||
|     StringBuilder builder; | ||||
|     SourceGenerator generator { builder }; | ||||
| 
 | ||||
|     // FIXME: This should write the entire span.
 | ||||
|     TRY(file.write_some(generator.as_string_view().bytes())); | ||||
|     TRY(file.write_until_depleted(generator.as_string_view().bytes())); | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
|  | @ -335,8 +334,7 @@ Optional<Emoji> find_emoji_for_code_points(ReadonlySpan<u32> code_points) | |||
| } | ||||
| )~~~"); | ||||
| 
 | ||||
|     // FIXME: This should write the entire span.
 | ||||
|     TRY(file.write_some(generator.as_string_view().bytes())); | ||||
|     TRY(file.write_until_depleted(generator.as_string_view().bytes())); | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
|  | @ -381,8 +379,7 @@ static ErrorOr<void> generate_emoji_installation(Core::BufferedFile& file, Emoji | |||
|         generator.append(" @name@ (@status@)\n"sv); | ||||
|     } | ||||
| 
 | ||||
|     // FIXME: This should write the entire span.
 | ||||
|     TRY(file.write_some(generator.as_string_view().bytes())); | ||||
|     TRY(file.write_until_depleted(generator.as_string_view().bytes())); | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -866,8 +866,7 @@ ReadonlySpan<CaseFolding const*> case_folding_mapping(u32 code_point); | |||
| } | ||||
| )~~~"); | ||||
| 
 | ||||
|     // FIXME: This should write the entire span.
 | ||||
|     TRY(file.write_some(generator.as_string_view().bytes())); | ||||
|     TRY(file.write_until_depleted(generator.as_string_view().bytes())); | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
|  | @ -1355,8 +1354,7 @@ bool code_point_has_@enum_snake@(u32 code_point, @enum_title@ @enum_snake@) | |||
| } | ||||
| )~~~"); | ||||
| 
 | ||||
|     // FIXME: This should write the entire span.
 | ||||
|     TRY(file.write_some(generator.as_string_view().bytes())); | ||||
|     TRY(file.write_until_depleted(generator.as_string_view().bytes())); | ||||
|     return {}; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tim Schumacher
						Tim Schumacher