diff --git a/Sources/Lotsawa/Chart.swift b/Sources/Lotsawa/Chart.swift index edeb925..e601913 100644 --- a/Sources/Lotsawa/Chart.swift +++ b/Sources/Lotsawa/Chart.swift @@ -273,6 +273,7 @@ extension Chart { } /// A Leo or Earley item bundled with a single mainstem cause. + @dynamicMemberLookup public struct Entry: Comparable, Hashable { var item: ItemID @@ -298,6 +299,10 @@ extension Chart { public static func < (lhs: Self, rhs: Self) -> Bool { (lhs.item.key, lhs.mainstemIndexStorage) < (rhs.item.key, rhs.mainstemIndexStorage) } + + subscript(dynamicMember m: KeyPath) -> Target { + item[keyPath: m] + } } private func isItemIndexStart(_ i: Entries.Index) -> Bool {