Skip to content

feat(structure-editor): union, nested, pointer, bitfields in SimpleBlockInterpreter #237

@abbaye

Description

@abbaye

Context

SimpleBlockInterpreter previously skipped union, nested, pointer, and bitfield block types. These are now fully implemented (commit 27ef321a).

What changed

  • union: resolves discriminant variable, selects matching variant, executes variant sub-fields or decodes inline ValueType; falls back to first variant
  • nested: expands inline struct Fields list; triggers bitfield expansion when Bitfields list is present
  • pointer: reads target address at offset, stores in TargetVar, labels result
  • bitfields: inline extraction from any field/nested block with Bitfields list; applies ValueMap lookup, stores extracted values as variables

Files affected

  • Services/SimpleBlockInterpreter.cs (+223 lines)

Follow-up

  • Add unit tests for each new block type
  • Handle recursive nested depth > 3 (stack overflow guard)
  • Document .whfmt schema additions for union/bitfields

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions