pub trait TargetLanguage: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn emit_import(&self, items: &[&str]) -> String;
fn emit_variable(&self, name: &str, type_: &str, value: &str) -> String;
fn emit_method_chain(
&self,
receiver: &str,
methods: &[(String, Vec<String>)],
) -> String;
fn emit_await(&self, expr: &str) -> String;
fn emit_error_handling(&self, expr: &str) -> String;
}Expand description
Trait for target language code generation