-
Notifications
You must be signed in to change notification settings - Fork 179
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
Implement formatting for Chinese calendar with some todos #3760
Conversation
} | ||
|
||
#[test] | ||
fn test_get_normal_month_code_if_leap() { |
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.
praise: thanks for writing a test!
match calendar { | ||
"gregory" | "buddhist" | "japanese" | "japanext" | "indian" | "persian" | "roc" => { | ||
&SOLAR_MONTH_CODES[0..12] | ||
} | ||
"coptic" | "ethiopic" | "chinese" => SOLAR_MONTH_CODES, | ||
"coptic" | "ethiopic" => SOLAR_MONTH_CODES, | ||
"chinese" => LUNAR_MONTH_CODES, |
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.
nit: I think here we should actually just return the SOLAR_MONTH_CODES! We're handling the lunar stuff in formatting code.
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.
Done
components/calendar/src/types.rs
Outdated
@@ -97,7 +97,7 @@ impl MonthCode { | |||
/// Returns an option which is Some containing the non-month version of a leap month | |||
/// if the MonthCode this method is called upon is a leap month, and None otherwise. | |||
/// This method assumes the MonthCode is valid. | |||
pub fn get_normal_if_leap(self) -> Option<MonthCode> { | |||
pub fn get_normal_if_leap(&self) -> Option<MonthCode> { |
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.
nit: MonthCode is Copy, this should just take self
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.
Done
let symbol = symbols.get(code).ok_or(Error::MissingMonthSymbol(code))?; | ||
|
||
let symbol_option = symbols.get(code); //.ok_or(Error::MissingMonthSymbol(code))?; | ||
let symbol = if symbol_option.is_none() { |
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.
I would use if let Some(symbol) = symbol_option {} else {}
I would also put the write_str
call inside the if let, so no need to let symbol =
. This way the else branch can pick which order to print things in (and we probably want to output the (leap)
after symbol
)
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.
I put write_str
directly inside the if statement, so there is no more need for symbol
or an if let
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.
I have a few comments which you can fix in a follow-up PR
if bytes[3] == b'L' { | ||
Some(MonthCode(TinyAsciiStr::from_bytes(&bytes[0..3]).ok()?)) | ||
} else { | ||
None | ||
} |
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.
Question: how does this code not create a clippy::indexing_slicing
failure? Is Clippy smart enough to know that this is a [u8; 4]
and that the indices are in range?
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.
Yes
/// TODO: Docs | ||
'U' => Cyclic = 2, | ||
/// TODO: Docs | ||
'r' => RelatedIso = 3, |
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.
Nit: File an issue for the TODO since it got merged without fixing. Our linting won't catch this.
.ok_or(Error::MissingDateSymbols)? | ||
.get_symbols_for_month(month, length)?; | ||
w.write_str(symbols.get(code).ok_or(Error::MissingMonthSymbol(code))?)?; | ||
w.write_str("(leap)")?; |
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.
Nit: Add a // TODO(#1234)
comment pointing to the issue number
#[test] | ||
fn test_year_formatting() {} |
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.
Nit: Delete this empty test
if symbols.is_empty() { | ||
return ""; // If symbols is empty, this calendar doesn't use eras (ex. Chinese) | ||
} |
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.
Issue: Not sure this is the right way to solve this problem. The era symbol should never have been requested if the calendar doesn't have eras. The pre-existing fallback behavior of using the era code name (which is the calendar name) seems acceptable.
@@ -102,6 +103,7 @@ macro_rules! impl_data_provider { | |||
|
|||
let mundi_name = ethioaa_data | |||
.eras | |||
// .ok_or_else(|| DataError::custom("Could not find eras"))? |
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.
Nit: Remove old code
@@ -64,7 +64,7 @@ fn get_month_code_map(calendar: &str) -> &'static [TinyStr4] { | |||
"gregory" | "buddhist" | "japanese" | "japanext" | "indian" | "persian" | "roc" => { | |||
&SOLAR_MONTH_CODES[0..12] | |||
} | |||
"coptic" | "ethiopic" => SOLAR_MONTH_CODES, | |||
"coptic" | "ethiopic" | "chinese" => SOLAR_MONTH_CODES, |
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.
Please add a TODO comment here with the issue number for fixing leap month formatting
commit c85e861 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:40:53 2023 +0200 borrow SingleID commit 06425a1 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:22:03 2023 +0200 fix comment indentation commit 2f70922 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:09:13 2023 +0200 update comments commit 47444ee Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:06:43 2023 +0200 fmt commit c0de3a0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:03:19 2023 +0200 fix clippy, allow testing of intermediate pass1 values commit 227f738 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:55:53 2023 +0200 fix compile errors by introducing 2 small clones per transliterator commit 512b158 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:49:01 2023 +0200 doesn't compile - missing self deconstruction commit 7848f09 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:40:51 2023 +0200 use rule group aggregation in pass1 commit 93663e4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:09:29 2023 +0200 add rule group aggregation commit 57666eb Author: Niels Saurer <[email protected]> Date: Wed Aug 9 14:12:19 2023 +0200 Squash of transliterator-compiler commit d1812b4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:31:53 2023 +0200 fix merge mistake commit f15f6eb Merge: abb91cc a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:27:08 2023 +0200 Merge branch 'main' into transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate commit a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:19:28 2023 +0200 Add Parsing for Rule-Based Transliterators (unicode-org#3730) commit 57e9d59 Author: Andrew Cupps <[email protected]> Date: Tue Aug 8 18:53:26 2023 -0700 Resolve follow-up comments to unicode-org#3760 (unicode-org#3818) * Docs for `U` and `r` * Delete empty test and add todo * Remove old code and empty era check * Add todo
commit ae14cdc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 21:04:38 2023 +0200 clippy commit 8a14e3e Author: Niels Saurer <[email protected]> Date: Wed Aug 9 21:02:28 2023 +0200 tutorials cargo lock commit 4256873 Merge: 72cff57 f549131 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:56:20 2023 +0200 Merge branch 'main' into transliterator-datastruct-generation commit 72cff57 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:42:03 2023 +0200 refactor pass2 interface commit 8fa4dfd Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:31:29 2023 +0200 skip compilation of cursors on source side, anchors on target side commit 54b0542 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:09:50 2023 +0200 add comment commit cba53a7 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:04:27 2023 +0200 fix clippy warnings commit 2dd2ec8 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:01:15 2023 +0200 fmt commit 56774fe Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:45:22 2023 +0200 refactor MutVarTable commit 6176769 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:31:18 2023 +0200 revamp pass2 API commit f8459c9 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:22:47 2023 +0200 initial final data struct generation commit d6873b0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:48:41 2023 +0200 Squash of transliterator-ir commit c85e861 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:40:53 2023 +0200 borrow SingleID commit 06425a1 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:22:03 2023 +0200 fix comment indentation commit 2f70922 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:09:13 2023 +0200 update comments commit 47444ee Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:06:43 2023 +0200 fmt commit c0de3a0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:03:19 2023 +0200 fix clippy, allow testing of intermediate pass1 values commit 227f738 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:55:53 2023 +0200 fix compile errors by introducing 2 small clones per transliterator commit 512b158 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:49:01 2023 +0200 doesn't compile - missing self deconstruction commit 7848f09 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:40:51 2023 +0200 use rule group aggregation in pass1 commit 93663e4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:09:29 2023 +0200 add rule group aggregation commit 57666eb Author: Niels Saurer <[email protected]> Date: Wed Aug 9 14:12:19 2023 +0200 Squash of transliterator-compiler commit d1812b4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:31:53 2023 +0200 fix merge mistake commit f15f6eb Merge: abb91cc a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:27:08 2023 +0200 Merge branch 'main' into transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate commit a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:19:28 2023 +0200 Add Parsing for Rule-Based Transliterators (unicode-org#3730) commit 57e9d59 Author: Andrew Cupps <[email protected]> Date: Tue Aug 8 18:53:26 2023 -0700 Resolve follow-up comments to unicode-org#3760 (unicode-org#3818) * Docs for `U` and `r` * Delete empty test and add todo * Remove old code and empty era check * Add todo commit c55c641 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 02:36:53 2023 +0200 wip commit c6cbb0a Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:20:08 2023 +0200 Squash of transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate
commit 1145a17 Author: Niels Saurer <[email protected]> Date: Thu Aug 10 02:06:46 2023 +0200 Squash merge transliterator-ir commit 9d55038 Author: Niels Saurer <[email protected]> Date: Thu Aug 10 02:03:34 2023 +0200 fix push_front/push_back mixup commit dc8dda7 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 23:02:10 2023 +0200 remove empty line commit bfe5827 Merge: c85e861 f549131 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:57:11 2023 +0200 Merge branch 'main' into transliterator-ir commit c85e861 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:40:53 2023 +0200 borrow SingleID commit 06425a1 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:22:03 2023 +0200 fix comment indentation commit 2f70922 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:09:13 2023 +0200 update comments commit 47444ee Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:06:43 2023 +0200 fmt commit c0de3a0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:03:19 2023 +0200 fix clippy, allow testing of intermediate pass1 values commit 227f738 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:55:53 2023 +0200 fix compile errors by introducing 2 small clones per transliterator commit 512b158 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:49:01 2023 +0200 doesn't compile - missing self deconstruction commit 7848f09 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:40:51 2023 +0200 use rule group aggregation in pass1 commit 93663e4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:09:29 2023 +0200 add rule group aggregation commit 57666eb Author: Niels Saurer <[email protected]> Date: Wed Aug 9 14:12:19 2023 +0200 Squash of transliterator-compiler commit d1812b4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:31:53 2023 +0200 fix merge mistake commit f15f6eb Merge: abb91cc a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:27:08 2023 +0200 Merge branch 'main' into transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate commit 208abd7 Author: Niels Saurer <[email protected]> Date: Thu Aug 10 02:02:23 2023 +0200 add data struct generation tests commit d1f7e7c Author: Niels Saurer <[email protected]> Date: Thu Aug 10 00:58:50 2023 +0200 fix debug_assert bug commit 1f5c8dd Author: Niels Saurer <[email protected]> Date: Wed Aug 9 23:25:17 2023 +0200 refactor pass2 slightly commit ae14cdc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 21:04:38 2023 +0200 clippy commit 8a14e3e Author: Niels Saurer <[email protected]> Date: Wed Aug 9 21:02:28 2023 +0200 tutorials cargo lock commit 4256873 Merge: 72cff57 f549131 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:56:20 2023 +0200 Merge branch 'main' into transliterator-datastruct-generation commit 72cff57 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:42:03 2023 +0200 refactor pass2 interface commit 8fa4dfd Author: Niels Saurer <[email protected]> Date: Wed Aug 9 20:31:29 2023 +0200 skip compilation of cursors on source side, anchors on target side commit 54b0542 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:09:50 2023 +0200 add comment commit cba53a7 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:04:27 2023 +0200 fix clippy warnings commit 2dd2ec8 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 19:01:15 2023 +0200 fmt commit 56774fe Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:45:22 2023 +0200 refactor MutVarTable commit 6176769 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:31:18 2023 +0200 revamp pass2 API commit f8459c9 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 18:22:47 2023 +0200 initial final data struct generation commit d6873b0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:48:41 2023 +0200 Squash of transliterator-ir commit c85e861 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:40:53 2023 +0200 borrow SingleID commit 06425a1 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:22:03 2023 +0200 fix comment indentation commit 2f70922 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:09:13 2023 +0200 update comments commit 47444ee Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:06:43 2023 +0200 fmt commit c0de3a0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 17:03:19 2023 +0200 fix clippy, allow testing of intermediate pass1 values commit 227f738 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:55:53 2023 +0200 fix compile errors by introducing 2 small clones per transliterator commit 512b158 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:49:01 2023 +0200 doesn't compile - missing self deconstruction commit 7848f09 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:40:51 2023 +0200 use rule group aggregation in pass1 commit 93663e4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 16:09:29 2023 +0200 add rule group aggregation commit 57666eb Author: Niels Saurer <[email protected]> Date: Wed Aug 9 14:12:19 2023 +0200 Squash of transliterator-compiler commit d1812b4 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:31:53 2023 +0200 fix merge mistake commit f15f6eb Merge: abb91cc a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:27:08 2023 +0200 Merge branch 'main' into transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate commit a39cfed Author: Niels Saurer <[email protected]> Date: Wed Aug 9 13:19:28 2023 +0200 Add Parsing for Rule-Based Transliterators (unicode-org#3730) commit 57e9d59 Author: Andrew Cupps <[email protected]> Date: Tue Aug 8 18:53:26 2023 -0700 Resolve follow-up comments to unicode-org#3760 (unicode-org#3818) * Docs for `U` and `r` * Delete empty test and add todo * Remove old code and empty era check * Add todo commit c55c641 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 02:36:53 2023 +0200 wip commit c6cbb0a Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:20:08 2023 +0200 Squash of transliterator-compiler commit abb91cc Author: Niels Saurer <[email protected]> Date: Wed Aug 9 01:12:13 2023 +0200 reformat tests commit f6a10f5 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:30:09 2023 +0200 sizes => counts commit 9ffc2f0 Author: Niels Saurer <[email protected]> Date: Wed Aug 9 00:26:27 2023 +0200 add more docs commit eae5748 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:46:20 2023 +0200 remove TODO commit 6b09689 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:28:42 2023 +0200 improve docs commit c9b16d5 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 23:15:23 2023 +0200 clippy commit 020a677 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 22:53:14 2023 +0200 add result aggregation to first pass commit 2d1bfd7 Author: Niels Saurer <[email protected]> Date: Tue Aug 8 16:28:23 2023 +0200 add tests commit 6f35ea5 Author: Niels Saurer <[email protected]> Date: Mon Aug 7 22:25:56 2023 +0200 CI fixes commit c6c4844 Author: Niels Saurer <[email protected]> Date: Sun Aug 6 20:06:31 2023 +0200 first steps commit fb68218 Author: Niels Saurer <[email protected]> Date: Wed Jul 19 16:21:33 2023 +0000 Squash transliterator-parser structure for transliterator parser start parsing ':: ... ;' rules complete ::-rule parsing add more global filter tests add negative tests for '::'-rules, be more restrictive update error docs add comment about static UnicodeSet type alias add variable defs escaping and fix unicodeset handling fix unicodeset tests function calls add variable-inside-unicodesets update tests rewrite parse_section using parse_element fix unquoted literal handling add cursor/placeholder tests add cursor support add allow(unused) for this PR remove unused dependencies add todo about inefficient unicodeset variablemap handling allow usage of UnicodeSet's VariableMap directly in TransliteratorParser avoid one allocation per parsed unicodeset remove done todo about allocation-free unicodeset parser hook avoid allocations for number parsing invalid num err with offset update comment switch to allocation free hex parsing (and support for multi escapes) fix main merge conflict support \p unicodesets remove todo for \p unicodeset parsing turn low-prio todo about avoiding clones into note turn non-memory-safety safety comments into regular comments add issue number to TODOs add transliteration component crate
This PR implements formatting for the Chinese calendar, including adding support for cyclic years
U
and related ISO yearsr
. There are still some issues to be addressed, however @sffc and I have agreed these are non-blocking for this PR and can be addressed separately (see #3761 and #3762).