1use alloc::{string::String, string::ToString, vec, vec::Vec};
8
9use super::{CodegenBackend, GeneratedFile};
10use crate::css::Css;
11
12#[derive(Copy, Clone, Debug)]
13pub struct CppBackend;
14
15impl CodegenBackend for CppBackend {
16 fn lang(&self) -> &'static str {
17 "cpp"
18 }
19
20 fn emit_css(&self, _css: &Css) -> String {
21 "// TODO: C++ codegen backend not yet implemented.\n".to_string()
22 }
23
24 fn emit_project(&self, css: &Css) -> Vec<GeneratedFile> {
25 vec![GeneratedFile {
26 path: "main.cpp".to_string(),
27 contents: self.emit_css(css),
28 }]
29 }
30}