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

feat(#3164): auto named abstract objects + names for horizontal anonymous objects #3165

Merged

Conversation

maxonfjvipon
Copy link
Member

@maxonfjvipon maxonfjvipon commented May 4, 2024

Syntax's extended:

  1. [] >> is allowed now and means that this abstract object is named automatically by the compiler. Such syntax construction can be used ONLY if the abstract object (horizontal or vertical) is used as argument of vertical application
  2. x > [] > z is allowed and means the same as:
[] > z
  x > @
  1. [] (a > b) > c is allowed and means the same as:
[] > c
  a > b

Closes: #3164


PR-Codex overview

The focus of this PR is to update various EO language files, including stdout, tuple, true, false, int, bytes, and more.

Detailed summary

  • Updated methods and structures in multiple EO files
  • Added new functionalities like negation, division, and conditional execution
  • Updated test resources and samples for different EO language features

The following files were skipped due to too many changes: eo-parser/src/main/java/org/eolang/parser/XeEoListener.java, eo-parser/src/main/antlr4/org/eolang/parser/Eo.g4

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@maxonfjvipon maxonfjvipon changed the title feat(#3164): auto named abstract objects feat(#3164): auto named abstract objects + names for horizontal anonymous objects May 4, 2024
.enter()
.prop(
"name",
String.format("OBJ-%s", UUID.randomUUID())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxonfjvipon a much safer way would be to use the line number in the file - it is definitely unique.

@maxonfjvipon
Copy link
Member Author

@yegor256 please check

@yegor256
Copy link
Member

yegor256 commented May 6, 2024

@rultor merge

@rultor
Copy link
Contributor

rultor commented May 6, 2024

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit 1a0a46b into objectionary:master May 6, 2024
20 checks passed
@rultor
Copy link
Contributor

rultor commented May 6, 2024

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 22min)

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

Successfully merging this pull request may close these issues.

Extend grammar to mark objects to be named automatically
3 participants