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::{
9
    string::{String, ToString},
10
    vec,
11
    vec::Vec,
12
};
13

            
14
use super::{CodegenBackend, GeneratedFile};
15
use crate::css::Css;
16

            
17
#[derive(Copy, Clone, Debug)]
18
pub struct PythonBackend;
19

            
20
impl CodegenBackend for PythonBackend {
21
    fn lang(&self) -> &'static str {
22
        "python"
23
    }
24

            
25
    fn emit_css(&self, _css: &Css) -> String {
26
        "# TODO: Python codegen backend not yet implemented.\n".to_string()
27
    }
28

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