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§
- Print
Formatter - 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