precis_tools/generators/
codepoints.rs1use crate::error::Error;
2use crate::generators::CodeGen;
3use std::fs::File;
4use std::io::Write;
5
6pub struct CodepointsGen {}
16
17impl CodepointsGen {
18 pub fn new() -> Self {
20 Self {}
21 }
22}
23
24impl Default for CodepointsGen {
25 fn default() -> Self {
26 Self::new()
27 }
28}
29
30impl CodeGen for CodepointsGen {
31 fn generate_code(&mut self, file: &mut File) -> Result<(), Error> {
32 let template = include_str!("codepoints.template");
33 Ok(writeln!(file, "{}", template)?)
34 }
35}