-
Notifications
You must be signed in to change notification settings - Fork 127
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
How to read objects with dots? #2751
Comments
@maxonfjvipon Could you help here? |
@volodya-lombrozo I think we can write a blog post about it where we can explain syntax notations in EO. |
@maxonfjvipon Could you help me here for now, please? It's kind of urgent. |
@volodya-lombrozo we have 4 notations for methods. For
You output is not really correct |
@maxonfjvipon Thanks |
@volodya-lombrozo let me know if you have any more questions |
@maxonfjvipon If I have <o base="plus">
<o base="int" data="bytes">00 00 00 00 00 00 00 01</o>
<o base="int" data="bytes">00 00 00 00 00 00 00 02</o>
</o> or <o base=".plus">
<o base="int" data="bytes">00 00 00 00 00 00 00 01</o>
<o base="int" data="bytes">00 00 00 00 00 00 00 02</o>
</o> |
@volodya-lombrozo it's the second option:
|
@yegor256 Ok, then I confused. For the <o base=".plus">
<o base=".intValue">
<o base="$"/>
<o base=".a"/>
</o>
<o base="int" data="bytes">00 00 00 00 00 00 00 01</o>
</o> And it seems correct to me according with your answer. But this XMIR is represented as follows:
|
@volodya-lombrozo don't you miss the
|
@volodya-lombrozo simply put, this:
is the same as:
The parser produces the first form, while a special XSL transformation turns it into the second one: https://github.com/objectionary/eo/blob/master/eo-parser/src/main/resources/org/eolang/parser/wrap-method-calls.xsl It's a technical limitation of the parser, we can't overcome it :( |
@yegor256 Since I don't use |
@volodya-lombrozo you should use it, I believe. You should not work with the XMIR produced by the parser without optimizations provided by the |
@yegor256 So, I have to receive the following XMIR: <o base=".plus">
<o base=".intValue">
<o base=".a">
<o base="$"/>
</o>
</o>
<o base="int" data="bytes">00 00 00 00 00 00 00 01</o>
</o> for |
@yegor256 I don't use the parser either. I'm trying to construct XMIR from bytecode instructions. |
@volodya-lombrozo yes, this is correct:
|
@yegor256 I think maybe we actually can... let me inverstigate |
@volodya-lombrozo still a bug? |
@yegor256 I believe we need to add some docs about |
@volodya-lombrozo this mechanism is explained here: https://news.eolang.org/2022-11-25-xmir-guide.html (see the "methods" section) |
@yegor256 First of all, this link is far from the repository. When you close this ticket, I will loose it immediately. |
@volodya-lombrozo I agree, we'll deal with it in #3375 |
I received the following
eo
code:It should be something like
this.a.foo() + 1
in java. To be honest, I just can't understand if I received the correct output. How should I readeo
objects with dots in the beginning?Maybe you can add some examples to the README?
The text was updated successfully, but these errors were encountered: