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

            
7
use alloc::{
8
    string::{String, ToString},
9
    vec,
10
    vec::Vec,
11
};
12

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

            
16
#[derive(Copy, Clone, Debug)]
17
pub struct CppBackend;
18

            
19
impl CodegenBackend for CppBackend {
20
    fn lang(&self) -> &'static str {
21
        "cpp"
22
    }
23

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

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