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

[feature] Blocks: remove identity else (else error -> error end) from with clauses #84

Closed
novaugust opened this issue Nov 11, 2023 · 0 comments · Fixed by #85
Closed
Labels
enhancement New feature or request

Comments

@novaugust
Copy link
Contributor

novaugust commented Nov 11, 2023

Saw this while going thru existing codebase and was surprised we aren't already auto-rewriting it.
given a with statement with a valid multi head but an else clause that does nothing, remove the else clause

# input
with ...a do
  ...b
else
  error -> error
end

# output
with ...a do
  ....b
end

should be decently easy to implement with the existing nodes_equivalent? helper in blocks

@novaugust novaugust added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Nov 11, 2023
@novaugust novaugust changed the title [feature] Blocks: remove identity else from with clauses else error -> error end [feature] Blocks: remove identity else (else error -> error end) from with clauses Nov 12, 2023
@novaugust novaugust removed good first issue Good for newcomers help wanted Extra attention is needed labels Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant