Produce first output

This commit is contained in:
2022-09-13 21:35:52 +02:00
parent 4b69d678e8
commit 888a6247a9
5 changed files with 26 additions and 15 deletions

View File

@@ -1,6 +1,13 @@
use tool_helper::{Input, Output, Result};
pub use tool_helper::Error;
pub fn convert(_input: Input, _output: Output) -> Result<()> {
Err(Error::new(-1, "Not implemented yet".to_owned()))
fn write_cpp(_input: Input, output: &mut Output, line_feed: &str) -> Result<()> {
Error::try_with(write!(output, "const char data[] = {{{}", line_feed))?;
Error::try_with(write!(output, "}};"))?;
Ok(())
}
pub fn convert(_input: Input, mut output: Output) -> Result<()> {
write_cpp(_input, &mut output, "\r\n")
}