Re-arrange source code and tests
This commit is contained in:
27
Sources/SwiftUIMath/Internal/Syntax/Atoms/Underline.swift
Normal file
27
Sources/SwiftUIMath/Internal/Syntax/Atoms/Underline.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
import Foundation
|
||||
|
||||
extension Math {
|
||||
final class Underline: Atom {
|
||||
var innerList: AtomList?
|
||||
|
||||
override var finalized: Math.Atom {
|
||||
let finalized = super.finalized
|
||||
|
||||
if let underline = finalized as? Underline {
|
||||
underline.innerList = underline.innerList?.finalized
|
||||
}
|
||||
|
||||
return finalized
|
||||
}
|
||||
|
||||
init(_ underline: Underline) {
|
||||
self.innerList = underline.innerList.map { AtomList($0) }
|
||||
super.init(underline)
|
||||
}
|
||||
|
||||
init(innerList: AtomList? = nil) {
|
||||
self.innerList = innerList
|
||||
super.init(type: .underline)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user