1
//! Python backend stub.
2
//!
3
//! Returns a single placeholder source file noting that
4
//! the emitter is not implemented; the dispatch path in [`super::backend_for`]
5
//! is still wired so `?lang=python` produces a structured response instead of a
6
//! 404.
7

            
8
use alloc::{string::String, string::ToString, vec, vec::Vec};
9

            
10
use super::{CodegenBackend, GeneratedFile};
11
use crate::css::Css;
12

            
13
#[derive(Copy, Clone, Debug)]
14
pub struct PythonBackend;
15

            
16
impl CodegenBackend for PythonBackend {
17
    fn lang(&self) -> &'static str {
18
        "python"
19
    }
20

            
21
    fn emit_css(&self, _css: &Css) -> String {
22
        "# TODO: Python codegen backend not yet implemented.\n".to_string()
23
    }
24

            
25
    fn emit_project(&self, css: &Css) -> Vec<GeneratedFile> {
26
        vec![GeneratedFile {
27
            path: "main.py".to_string(),
28
            contents: self.emit_css(css),
29
        }]
30
    }
31
}