Skip to content
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

Can't use ' for object.attr #1214

Closed
levBagryansky opened this issue Sep 13, 2022 · 1 comment · Fixed by #1216
Closed

Can't use ' for object.attr #1214

levBagryansky opened this issue Sep 13, 2022 · 1 comment · Fixed by #1216
Assignees
Labels

Comments

@levBagryansky
Copy link
Member

levBagryansky commented Sep 13, 2022

@yegor256 @Graur is it ok I cannot explicily copy an atrribut using ' like here?

[] > test
  [] > book
    "qwerty" > title
  book.title' > copy-title
  eq. > @
    copy-title
    "qwerty"

Here I get an error

[ERROR] Failed to execute goal org.eolang:eo-maven-plugin:0.27.0:assemble (test-compile) on project eo-threads: Execution test-compile of goal org.eolang:eo-maven-plugin:0.27.0:assemble failed: Failed to parse /home/tardis3/eo-threads/src/test/eo/org/eolang/threads/mutex-test.eo: [42:12] mismatched input ''' expecting {':', ' ', '.', EOL}: "  book.title' > copy-title": InputMismatchException -> [Help 1]
[ERROR] 

I think it is bug, because I can code this:

[] > test
  [] > book
    "qwerty" > title
  book.title > t
  t' > copy-title
  eq. > @
    copy-title
    "qwerty"

and it will means the same. So when we need to copy object that is attribute of smth, we need to do the step above.

@yegor256
Copy link
Member

@levBagryansky this is a bug in the parser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants