-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi line chained operator syntax #8415
Conversation
@kazcw, is there a documentation or tests of the chained operator syntax other than this single paragraph? What happens when the operator isn't |
there seem to be more tests here: enso/lib/rust/parser/debug/tests/parse.rs Lines 458 to 481 in 5216b8c
the first case contains other operators: value = nums
* each random
+ constant the second case contains a nested rect1
. width = 7
. center
+ x note that as per the design, it should be semantically equivalent to but at the very least, it means that the parser supports both these cases - i guess it's not explicitly part of the design, however the design does always say "an operator" rather than "the dot operator" |
engine/runtime-parser/src/test/java/org/enso/compiler/core/EnsoParserTest.java
Show resolved
Hide resolved
value = nums | ||
+ each random | ||
* constant | ||
"""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to @somebody1234's comment this is the desired behavior.
@somebody1234, @kazcw I am not sure what to think about
I believe it is not a valid syntax: what should it mean |
@JaroslavTulach yeah... i'd assume that one is just a parser test. |
The other inquiry I have is with nested blocks
what's the difference between the above and no-nesting block? rect1
. width
. center
+ x the latter one is clearly |
The behavior probably isn't fully correct, but the specification is so fuzzy that it's not clear what is correct anyway. Let's integrate at current state and solve the rest as bugs. |
Pull Request Description
Fixes #7904.
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Java,
style guides.