Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullability, Grid-Compositor Integration, etc. #62

Merged
merged 3 commits into from
Jul 11, 2022
Merged

Nullability, Grid-Compositor Integration, etc. #62

merged 3 commits into from
Jul 11, 2022

Conversation

ShikiSuen
Copy link
Collaborator

@ShikiSuen ShikiSuen commented Jul 11, 2022

本次 v1.2.8 維護更新主要修改這幾點:

  1. 符號命名體系有所更動,活用 private(set)。
  2. 將 Compositor 與 Grid 整合:前者直接繼承後者。
  3. 因為實際使用當中 NodeAnchor 的 Node 一定不會是 nil,所以直接去掉了這個變數的 nil 能力。這樣可以(同時在模組內與模組外)節省海量的 guard-let / if-let 判定。
  4. 對 walk() 做了簡化:將 reverseWalk() 作為內部處理隱藏起來,且讓對外的 walk() 無須傳入任何參數。
  5. 讓 fixNode 手動選字函式的生效範圍更廣,且允許在此過程中僅針對指定讀音來執行手動選字操作。
  6. 豐富單元測試的內容。
  7. NodeAnchor 及 Node 這兩種型別現可雜湊化。

P.S.: 本次特意有測試是否可以將 NodeAnchor 與 Node 整合在一起。然而這樣一來的話會導致手動選字功能失效,所以只能作罷。NodeAnchor 這個結構型別獨立而生所帶來的唯一便利,恐怕就是為了讓裡面的 Node 對自身的函數操作生效。

@ShikiSuen ShikiSuen force-pushed the lab/1.2.8 branch 6 times, most recently from 2b1c1d7 to 06a0c8d Compare July 11, 2022 10:18
@ShikiSuen ShikiSuen merged commit 025153a into main Jul 11, 2022
@ShikiSuen ShikiSuen deleted the lab/1.2.8 branch July 11, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant