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

Parse assignment operators / 'if' function as expression instead of statement #304

Closed
12 tasks done
sys27 opened this issue Sep 4, 2020 · 0 comments · Fixed by #351, #355, #370 or #642
Closed
12 tasks done

Parse assignment operators / 'if' function as expression instead of statement #304

sys27 opened this issue Sep 4, 2020 · 0 comments · Fixed by #351, #355, #370 or #642
Assignees
Milestone

Comments

@sys27
Copy link
Owner

sys27 commented Sep 4, 2020

Affects:

  • ++
  • --
  • +=
  • -=
  • *=
  • /=
  • <<=
  • >>=
  • :=
  • if
  • def
  • undef?

Open Question: All expressions with variable assignment will return assigned value, but what about function assignments?
Possible solution: Split parsing of assign operators to two paths, the first one for function and it will remain statement, and the second one for variables.
Possible solution #2: #628

Check precedence #343

It will allow to support the following expressions:

  • x := 1 + (y := 2)
  • x := if(y == 0, 1, -1)
@sys27 sys27 added this to the xFunc 4.0.0 milestone Sep 4, 2020
@sys27 sys27 self-assigned this Sep 4, 2020
@sys27 sys27 added proposal Features that are not approved yet and removed question labels Sep 4, 2020
sys27 added a commit that referenced this issue Sep 21, 2020
sys27 added a commit that referenced this issue Sep 21, 2020
sys27 added a commit that referenced this issue Sep 21, 2020
sys27 added a commit that referenced this issue Sep 21, 2020
sys27 added a commit that referenced this issue Sep 29, 2020
sys27 added a commit that referenced this issue Sep 29, 2020
@sys27 sys27 linked a pull request Sep 29, 2020 that will close this issue
@sys27 sys27 removed the proposal Features that are not approved yet label Sep 29, 2020
sys27 added a commit that referenced this issue Oct 1, 2020
sys27 added a commit that referenced this issue Oct 1, 2020
@sys27 sys27 linked a pull request Oct 1, 2020 that will close this issue
sys27 added a commit that referenced this issue Oct 9, 2020
sys27 added a commit that referenced this issue Oct 9, 2020
sys27 added a commit that referenced this issue Oct 9, 2020
@sys27 sys27 linked a pull request Oct 9, 2020 that will close this issue
@sys27 sys27 modified the milestones: xFunc 4.0.0, Backlog Jan 4, 2021
@sys27 sys27 modified the milestones: Backlog, xFunc 4.2.0 Jun 4, 2023
sys27 added a commit that referenced this issue Jul 5, 2023
@sys27 sys27 closed this as completed in #642 Jul 5, 2023
sys27 added a commit that referenced this issue Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment