Closed JaroslavTulach closed 6 months ago
@JaroslavTulach i think you messed up the link?
@kazcw what do you think? As far as I can see in debugger the chained code is equivalent to b . to_vector . sort
- e.g. the chain is only applied to the b
and not to the result of the whole if_then_else
.
There are three tests. Two work, but testIfAndBlockSyntax
fails. Is that correct or wrong, @kazcw?
I'm looking for a consistent rule that would make this work. Here's a candidate:
The body of an else
segment is either:
else
on the same line)This is a change from current behavior, in which if the else
has in-line content, any following child block belongs to the else
branch.
This would also affect other block types, e.g. this:
main =
value = if t then f1 else f2
y
Would be equivalent to this:
main =
value = (if t then f1 else f2)
y
IMO it minimizes confusion to treat all block types the same way in this regard.
What do you think, @JaroslavTulach? If we shall do it, I can use the AST-comparison script to check for any existing code relying on the old behavior.
The rest of the line (if non-empty) A following child block (if there is no expression following the else on the same line)
+1
Jaroslav Tulach reports a new STANDUP for yesterday (2024-02-21):
Progress: - rust parser: https://github.com/enso-org/enso/pull/8671/files#r1497057518
atom_with_hole
Polyglot_Spec
: https://github.com/enso-org/enso/pull/9126Next Day: Rust parser, Extension methods for Java
GitHubPull Request Description Attempt to fix #8489 by adding test describing current behavior: c5bef79 another test showing desired Group-like behavior: 1c722f4 changing the first test to behave like t...
Jaroslav Tulach reports a new STANDUP for yesterday (2024-02-22):
Progress: - chained if_then_else
re-review: https://github.com/enso-org/enso/pull/8671#pullrequestreview-1894921442
Next Day: Extension methods for Java
Jaroslav Tulach reports a new STANDUP for yesterday (2024-02-23):
Progress: - bookclubbing
Next Day: Extension methods for Java
Assuming that
and
shall be the same. They are not right now on
2023.2.1-nightly.2023.12.7