Open robertbastian opened 4 months ago
@zbraniecki
In 2.0 I'm adding https://unicode-org.github.io/icu4x/rustdoc/icu_datetime/neo_pattern/struct.DateTimePattern.html which is a polished API around datetime::pattern::reference
. I don't know if we need/want a public API around plurals::pattern::reference
. I'm not super happy with it being doc(hidden).
The reason I added reference
is that it allows for canonical parse/edit/serialize loopback on the rules/patterns.
This is used by datagen but the target audience is wider - customers who want to manipulate a Plural Rule should be able to acquire this parser/serializer pair from icu_plurals
. I'm ok for this to be behind a flag, but I'd be against moving it out of the respective crate.
@zbraniecki, do you want the whole module exported with all its (fairly deep) AST APIs and things, or would you be happy with a high-level API with just a few functions like parse and serialize?
from_str
impls, but I didn't do them here. If the only purpose for these types is datagen, they should live in datagen.datagen
feature.cldr_utils
? Or just cldr
?PatternItem
and Field
.Conclusion for 2.0:
LGTM: @sffc @robertbastian @zbraniecki
Seems to be datagen-only code?
Both
icu_plurals::rules
andicu_datetime::pattern
have parallelreference
andruntime
modules, presumablyreference
is not used at runtime?