-
Notifications
You must be signed in to change notification settings - Fork 0
Trie cleanup #4
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
Trie cleanup #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the character property system by consolidating multiple property types into four meaningful categories. The refactoring reduces complexity while maintaining the same functionality for width calculations.
- Merges
East_Asian_FullwidthandEast_Asian_Wideinto a singleEast_Asian_Full_Wideproperty - Consolidates
ControlChar,CombiningMark, and existingZeroWidthinto a unifiedZeroWidthproperty - Removes type casting from the trie generation and moves it to the application layer
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/gen/unicode.go | Updates property definitions and bitmap building logic to use consolidated properties |
| internal/gen/trie.go | Removes property type casting from trie generation and updates constant formatting |
| width.go | Updates property lookups and width calculations to use new consolidated properties |
| width_test.go | Updates test cases to use new property names and removes obsolete test cases |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 9 out of 15 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Excellent refactoring! This PR successfully simplifies the property system by consolidating semantically identical properties:
Key strengths:
The consolidation is semantically correct - the old properties had identical width calculation behavior. Nice work simplifying without changing functionality! Review by Cursor AI using Claude Sonnet 4.5 |
We don’t need as many distinct values in the
propertyenum. There are only 4 meaningful categories:Also no need to cast to
propertyin the trie itself, just do it in the app