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

Simplify branches with true or false conditions #102

Open
steffenenders opened this issue Jul 29, 2022 · 3 comments · May be fixed by #379
Open

Simplify branches with true or false conditions #102

steffenenders opened this issue Jul 29, 2022 · 3 comments · May be fixed by #379
Assignees
Labels
feature-request New feature or request

Comments

@steffenenders
Copy link
Member

Proposal

This is a follow-up issue from #59 .

if a condition is false, then we can simply remove the true branch and execute always the false branch, i.e., we can substitute the condition node with the false branch. Symmetrically, one would replace each condition node with condition true by its true branch. But, in cases like this where the condition should not be false, we may lose content we do not want to lose.

Approach

No response

@steffenenders steffenenders added the feature-request New feature or request label Jul 29, 2022
@fnhartmann fnhartmann self-assigned this Jan 16, 2024
@fnhartmann
Copy link
Collaborator

Discussed to be implemented inside the CodeGenerator and not directly on the AST in earlier stages. There will be a config option since we are "deleting" code with this.

@fnhartmann
Copy link
Collaborator

/cib

Copy link
Contributor

github-actions bot added a commit that referenced this issue Jan 17, 2024
@github-actions github-actions bot linked a pull request Jan 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants