Closed lucaswerkmeister closed 6 years ago
Looks like the operator is settled now (final form: |>
), see eclipse/ceylon@4c0288b45ae908ab91b00b25f889b0c380df30bd for spec.
@gavinking the way that you implemented |>
and >|>
in eclipse/ceylon@5c80f1de3ebc4fb82e2bd59d491913384b6aa17f (desugaring them inside the parser) makes it almost impossible for me to format them. How difficult would it be to do that desugaring in a post-processing step instead (which I would skip)?
Pffffff. Hard, I think. You can't look at the token, or something?
I can try, but it’s almost certainly going to break as soon as you touch the desugaring code. And then I suppose I’ll also have to do the same thing in ceylon.ast, in both directions.
Thanks @lucaswerkmeister. Sorry about the hackery.
AFAICT eclipse/ceylon#6615 isn’t quite settled yet, but it looks like some form of the operator will make it into the next release, so don’t forget to add support for it.
Looks like this:
and should be formatted like that too, I think (one level of pre-indent, just like other binary operators).