SemanticTree: use StaticStringMap for structural role check

Improves performance and readability of isStructuralRole. Also includes minor syntax cleanup in AXNode.
This commit is contained in:
Adrià Arrufat
2026-03-11 16:37:24 +09:00
parent 1866e7141e
commit 37735b1caa
2 changed files with 17 additions and 16 deletions

View File

@@ -767,7 +767,7 @@ pub fn getName(self: AXNode, page: *Page, allocator: std.mem.Allocator) !?[]cons
pub fn endWriteRaw(_: @This()) void {}
};
const w = TextCaptureWriter{ .aw = &aw, .writer = &aw.writer };
const w: TextCaptureWriter = .{ .aw = &aw, .writer = &aw.writer };
const source = try self.writeName(w, page);
if (source != null) {