You can just make a PR, with some clear example in the description, and we wait a few days to see if someone has a problem with the language construct. The implementation looks OK at a quick glance. But of course I will review it closely when it gets in, and improve things where needed.
On Sat, Feb 10, 2024 at 5:48 PM Simon Hartley <scrhart...@yahoo.co.uk.invalid> wrote: > I've made an implementation of #on here: > > https://github.com/scrhartley/apache-freemarker/commit/cee8d076b02e8dbcae0b84eabc76814aaea8baf6 > > * Fall-through does not occur when using #on. > * #on supports multiple conditions > * #default may be used with #on > * This implementation doesn't allow mixing #case and #on. > * When #on has been used in the #switch then #break and #continue are not > supported, otherwise the legacy behavior is used. This means that the > behavior in a #default depends upon whether an #on has been used. > > I've updated some of the tests, but I'm unsure if that's sufficient. I saw > that switch.ftl exists, but since it's in the jython25 tests I left it > alone. After my changes "gradlew check" still passes. I haven't updated the > manual. > > I'm now looking for feedback and possibly next steps. What should happen > to get this ready for merge request? > > --- > Best regards, > Simon Hartley > > > > > > > > > On Saturday, 10 February 2024 at 09:31:32 GMT, Daniel Dekany < > daniel.dek...@gmail.com> wrote: > > > > > > > Because there's not an explicit closing tag for #case or #on, the use of > #break in the following avoids a trailing newline > > > Yeah, but that's really a hack. I mean, we have the same whitespace issue > with #else, and #elseif. So this is just not the feature where we address > whitespace issues in general. > > -- Best regards, Daniel Dekany