Fix LogicalExpression (&&, ||) handling in p5.strands#8359
Merged
davepagurek merged 2 commits intoprocessing:dev-2.0from Dec 26, 2025
Merged
Fix LogicalExpression (&&, ||) handling in p5.strands#8359davepagurek merged 2 commits intoprocessing:dev-2.0from
davepagurek merged 2 commits intoprocessing:dev-2.0from
Conversation
Add LogicalExpression handler to transpile logical operators to .or() and .and() method calls. Fixes processing#8358.
Contributor
|
Thanks for taking this on! For the OR test, can we test both the left and the top? in the original buggy example, the left was already showing up red, so the rest as written would pass. But the buggy version of the code was not correctly making the top red because only part of the of condition was being evaluated. For the AND test, rather than tearing right in the middle, which is where thr color should switch in this example, can we test a sample in each of the corners? just the bottom right should be filled in I think. |
- OR test now verifies both left and top edges are red - AND test now tests corners, with bottom-right being white and others black
davepagurek
approved these changes
Dec 26, 2025
Contributor
davepagurek
left a comment
There was a problem hiding this comment.
Thanks for the updates, looks great!
Contributor
|
@all-contributors please add @Aayushdev18 for code |
Contributor
|
I've put up a pull request to add @Aayushdev18! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for
LogicalExpressionnodes in the p5.strands transpiler so that&&and||conditions are correctly handled inifstatements.Changes
LogicalExpressionhandling alongside existingBinaryExpressionlogic&&and||conditionsTests
dev-2.0before this change and passes afterResolves #8358