python_assembler/formats/pyc/writer/
mod.rs

1use crate::formats::pyc::{view::PycView, PycWriteConfig};
2use gaia_types::GaiaError;
3use std::io::Write;
4
5#[derive(Debug)]
6pub struct LuacWriter<'config, W> {
7    pub(crate) writer: W,
8    pub(crate) config: &'config PycWriteConfig,
9    pub(crate) errors: Vec<GaiaError>,
10}
11
12impl PycWriteConfig {
13    pub fn as_writer<W: Write>(&self, writer: W) -> LuacWriter<W> {
14        LuacWriter::new(writer, self)
15    }
16}
17
18impl<'config, W> LuacWriter<'config, W> {
19    pub fn new(writer: W, config: &'config PycWriteConfig) -> Self {
20        LuacWriter { writer, config, errors: vec![] }
21    }
22}
23
24impl<'config, W: Write> LuacWriter<'config, W> {
25    pub fn write(&mut self, view: &PycView) -> Result<usize, GaiaError> {
26        todo!()
27    }
28}