mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-08-22 15:05:26 +00:00
further cleanup
This commit is contained in:
@ -58,13 +58,7 @@ struct InputGraph {
|
||||
self.nextCorrectNodeIndices[newIndex] = correctGraph.allowedNextIndex[nodeIndex]
|
||||
|
||||
// 次に置換を動かす
|
||||
let startNode = switch cgNode.inputStyle {
|
||||
case .systemFlickDirect:
|
||||
ReplaceSuffixTree.direct
|
||||
case .systemRomanKana:
|
||||
ReplaceSuffixTree.roman2kana
|
||||
default: fatalError("implement it")
|
||||
}
|
||||
let startNode = InputGraphInputStyle.init(from: cgNode.inputStyle).replaceSuffixTree
|
||||
// nodesをそれぞれ遡っていく必要がある
|
||||
typealias SearchItem = (
|
||||
suffixTreeNode: ReplaceSuffixTree.Node,
|
||||
|
@ -51,7 +51,16 @@ struct InputGraphInputStyle: Identifiable {
|
||||
}
|
||||
}
|
||||
|
||||
init(id: InputGraphInputStyle.ID, replaceSuffixTree: ReplaceSuffixTree.Node, correctPrefixTree: CorrectPrefixTree.Node) {
|
||||
init(from id: InputGraphInputStyle.ID) {
|
||||
self = switch id {
|
||||
case .all: .all
|
||||
case .systemFlickDirect: .systemFlickDirect
|
||||
case .systemRomanKana: .systemRomanKana
|
||||
default: fatalError("Unimplemented")
|
||||
}
|
||||
}
|
||||
|
||||
private init(id: InputGraphInputStyle.ID, replaceSuffixTree: ReplaceSuffixTree.Node, correctPrefixTree: CorrectPrefixTree.Node) {
|
||||
self.id = id
|
||||
self.replaceSuffixTree = replaceSuffixTree
|
||||
self.correctPrefixTree = correctPrefixTree
|
||||
|
Reference in New Issue
Block a user