feat: type selector overhaul, fuzzy search, address parser, value tracking

Redesign type selector popup with fuzzy subsequence matching, per-category
icons, field summary tooltips, compact chips, and pointer target primitives.
Add address expression parser with arithmetic and register support.
Enable track value changes by default.
This commit is contained in:
IChooseYou
2026-02-28 06:59:22 -07:00
committed by IChooseYou
parent 0d73575ea7
commit 6a51c904de
21 changed files with 2489 additions and 592 deletions

View File

@@ -172,7 +172,14 @@ static void emitStructBody(GenContext& ctx, uint64_t structId,
int structSize = tree.structSpan(structId, &ctx.childMap);
QString ind = indent(depth);
QVector<int> children = ctx.childMap.value(structId);
QVector<int> allChildren = ctx.childMap.value(structId);
QVector<int> children, helperIdxs;
for (int ci : allChildren) {
if (tree.nodes[ci].isHelper)
helperIdxs.append(ci);
else
children.append(ci);
}
std::sort(children.begin(), children.end(), [&](int a, int b) {
return tree.nodes[a].offset < tree.nodes[b].offset;
});
@@ -310,6 +317,14 @@ static void emitStructBody(GenContext& ctx, uint64_t structId,
// Tail padding (skip for unions)
if (!isUnion && cursor < structSize)
emitPadRun(cursor, structSize - cursor);
// Emit helper comments (helpers are runtime-only, not part of struct layout)
for (int hi : helperIdxs) {
const Node& h = tree.nodes[hi];
QString hType = h.structTypeName.isEmpty() ? ctx.cType(h.kind) : h.structTypeName;
ctx.output += ind + QStringLiteral("// helper: %1 %2 @ %3\n")
.arg(hType, sanitizeIdent(h.name), h.offsetExpr);
}
}
// ── Emit a complete top-level struct definition (Vergilius-style) ──