Skip to main content

JsTsExprEmitter

Trait JsTsExprEmitter 

Source
pub trait JsTsExprEmitter {
    // Required method
    fn expr_to_string(&mut self, node: &AIRNode) -> Result<String, CodegenError>;
}
Expand description

Lowers a single AIR expression to its target string, for the shared js/ts test-file builder. Implemented by a thin adapter over each backend’s private emit context so js_ts_generate_tests can reuse the exact expression lowering the runtime tree uses (function casing, enum/Optional reps, …).

Required Methods§

Source

fn expr_to_string(&mut self, node: &AIRNode) -> Result<String, CodegenError>

Render node as a target expression string.

§Errors

Propagates the backend’s CodegenError.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§