Closed Paula-Kli closed 4 years ago
I looked into it and currently I think that this is actually correct to parse it as a binary cascade:
1 + 5 negated; negated
"corresponds to"
1
+ 5 negated;
negated
"print it ->"
-1
Which is different from the unary message cascade case:
self new test; test
"corresponds to"
self new
test;
test
Yes and in your commit from 06.07. this works perfectly fine.
But in your updated version inspecting the cst I get this result:
I am starting to parse at the Rule Expression but this shouldn't make a difference right?
Ah oops. I meant it is correct to parse it as an OperandCascade. The receiver of the #+ is the 1, the argument is 5 negated
. Does it make a great difference for printing?
Ah ok I see! Thanks for clarifying that! I think we will ask our customer about it ;)
What is a binaryCascade then?
An example for a binary cascade would be:
1 + 2
raised to: 10;
yourself
In this case the receiver is the BinaryMessageSend 1 + 2
.
Ah alright!
Thanks a lot!! That explains it! In that case it works fine ;)
In the latest commit from 07.07.2020 binary cascades are again matched as operand cascades.
We tried matching
1 + 2 negated; negated
which was in the commit from 06.07.2020 matched as binaryCascade and in the commit from 07.07.2020 it is matched as operandCascade fromOhmExplicitSendsSmalltalk
.