…t, PSBaseTypeToStr
Hosts that embed a script debugger (watch windows, tooltips, REPL-style
inspection) all end up writing the same code: turn an arbitrary script
value into readable text and parse an edited value back. This adds the
helpers used by the TetzkatLipHoka fork's debugger frame:
- PSVariantToString(IFC, AppendType, NoQuotes): renders every base type
including sets (element list), records (field list), static/dynamic
arrays (element list, capped with '..' after 50 chars), variants
(with their VarType), nested pointers and classes (via TStrings.Text
or a published Caption/Title/Text/Lines/Strings property).
AppendType prefixes the Delphi-style type name; NoQuotes returns
string values raw instead of quoted.
- StringToPSVariant: the reverse direction for editable watches -
parses text into ordinal/float/string/char/variant slots and into
class instances via the same published properties. btPChar slots are
deliberately not written: they hold raw pointers to memory the engine
does not own.
- PSBaseTypeToStr(TPSBaseType/PIFTypeRec): base type names, optionally
as Delphi names ('Integer' instead of 'S32'); the PIFTypeRec overload
renders composed types (record field lists, array element types,
class names).
- VarTypeToString: readable names for TVarType values.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Hosts that embed a script debugger (watch windows, tooltips, REPL-style
inspection) all end up writing the same code: turn an arbitrary script
value into readable text and parse an edited value back. This adds the
helpers used by the TetzkatLipHoka fork's debugger frame:
PSVariantToString(IFC, AppendType, NoQuotes): renders every base type
including sets (element list), records (field list), static/dynamic
arrays (element list, capped with '..' after 50 chars), variants
(with their VarType), nested pointers and classes (via TStrings.Text
or a published Caption/Title/Text/Lines/Strings property).
AppendType prefixes the Delphi-style type name; NoQuotes returns
string values raw instead of quoted.
StringToPSVariant: the reverse direction for editable watches -
parses text into ordinal/float/string/char/variant slots and into
class instances via the same published properties. btPChar slots are
deliberately not written: they hold raw pointers to memory the engine
does not own.
PSBaseTypeToStr(TPSBaseType/PIFTypeRec): base type names, optionally
as Delphi names ('Integer' instead of 'S32'); the PIFTypeRec overload
renders composed types (record field lists, array element types,
class names).
VarTypeToString: readable names for TVarType values.
🤖 Generated with Claude Code