Operator sections #13955
kazcw
started this conversation in
Ideas and feedback
Operator sections
#13955
Replies: 2 comments
-
|
If it would be helpful, I can use our syntax tooling to survey the locations in our current |
Beta Was this translation helpful? Give feedback.
0 replies
-
Is there an erroneous snippet showing the error? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The Enso Spec defines rules for the bounds of an operator section (see last paragraph of section)--specifically, when an expression containing an elided operand is the first child of its parent expression, and the parent is not a parenthesis node, the parent expression is included in the operator section function.
The parser implements this rule, creating an
OprSectionBoundarynode in the appropriate position. However, the compiler has never been updated from the pre-spec behaviour, and currently ignores theOprSectionBoundary.We should fix this inconsistency. If the spec behaviour is desired, I think switching to it would be straightforward to implement, but it would be a semantics-changing backward-incompatible change, and so should be done sooner rather than later. Alternatively if we would like to keep the current semantics, we can make the AST consistent with the behaviour by eliminating
OprSectionBoundarynodes, and all the parser logic that computes their locations.Beta Was this translation helpful? Give feedback.
All reactions