Jacob Pratt

Results 357 comments of Jacob Pratt

Well…`Compound` is the whole thing and is already what's output from the macro. `Optional` and `First` are the ones without syntactical support. I'm open to any ideas you may have...

> AFAIU `Compound` is only supported at the root? `Compound` can be arbitrarily nested. I checked and `Compound` isn't what's actually output by the macro — it's just a slice...

Where would a user need to explicitly state that something is `Compound`? `First` takes a slice, and `Optional` is semantically only a single item regardless — a `Compound` would be...

That is my understanding as well. Note that the output from the parser isn't guaranteed, only the behavior, so the optimization noted is not mandatory. For the recursive part, I...

Somehow I never considered this before now, but in order to output these values from the runtime parser, owned format descriptions (#429) are necessary, as I can't emit a slice...

Mixed news on this front. I was able to implement option items fully with the aforementioned syntax, such that this test passes: ```rust assert_eq!( format_description::parse_owned("[optional [:[year]]]"), Ok(OwnedFormatItem::Compound(Box::new([ OwnedFormatItem::Optional(Box::new(OwnedFormatItem::Compound(Box::new([ OwnedFormatItem::Literal(Box::new(*b":")), OwnedFormatItem::Component(Component::Year(Default::default()))...

This has been implemented for the runtime parser on main. The escape character for a right bracket is a backslash. The only remaining step (implementation-wise) is to port it to...

- I probably _could_ use `]]` as an escape sequence, but it would be frustrating to deal with due to the otherwise unnecessary whitespace. This is quite evident, even in...

The reason `[[` was originally chose is because Rust uses `{{` to perform similar escaping in format strings. At that time, I did not consider that nested descriptions could ever...

Alright, round two! I have pushed a change that introduces backslash for escapes everywhere. You should be able to do `\\`, `\[`, and `\]`, resulting in a literal `\`, `[`,...