Skip to main content

print_expr

Function print_expr 

Source
pub fn print_expr(expr: &TsExpr) -> String
Expand description

Print a single TsExpr on its own — the expression-level sibling of print_type’s own “one fragment, not a whole document” entry point. Arc C, step (11) (#1388) need: emit_icu_placeholder’s own Select arm stays one opaque, hand-built block-bodied IIFE (at the time, TsExpr:: Arrow had no block-body variant at all, and extending it for that one site was rejected as disproportionate) — its own arm VALUES, emit_sub_message’s now-real TsExpr results, still need stringifying back into that opaque host text. #1435 (Arc E slice 1) later added TsArrowBody::Block for a genuinely different real site (serialisation.rs’s Float guard); emit_icu_placeholder’s own Select arm was not reconverted along with it — out of that slice’s own scope — so this call site’s opaque text stays exactly as it was. No source-map/buffer machinery, matching print_type/print_stmt’s own scope exactly.