Refactor model

This commit is contained in:
Guille Gonzalez
2026-01-01 12:41:56 +01:00
parent fbfc1d0ecf
commit e66eeb4564
19 changed files with 1845 additions and 12 deletions

View File

@@ -0,0 +1,27 @@
import Foundation
extension Math {
final class Accent: Atom {
var innerList: AtomList?
override var finalized: Math.Atom {
let finalized = super.finalized
if let accent = finalized as? Accent {
accent.innerList = accent.innerList?.finalized
}
return finalized
}
init(_ accent: Accent) {
self.innerList = accent.innerList.map { AtomList($0) }
super.init(accent)
}
init(value: String = "", innerList: AtomList? = nil) {
self.innerList = innerList
super.init(type: .accent, nucleus: value)
}
}
}