Skip to main content

Module print

Module print 

Source
Expand description

Shared formatting utilities for HIR debug printing.

This module provides PrintFormatter — a stateful formatter that both react_compiler::debug_print (HIR printer) and react_compiler_reactive_scopes::print_reactive_function (reactive printer) delegate to for shared formatting logic.

It also exports standalone formatting functions (format_loc, format_primitive, etc.) that require no state.

Structs§

PrintFormatter
Shared formatter state used by both HIR and reactive printers.

Functions§

format_js_string
Format a string like JS JSON.stringify: escape control chars and quotes but preserve non-ASCII unicode (e.g. U+00A0 nbsp) as literal characters.
format_loc
format_loc_value
format_non_local_binding
format_object_property_key
format_primitive
format_property_literal
format_value_kind
format_value_reason