Skip to content

Added boolean operation resolvers.#15

Merged
lextatic merged 2 commits intomainfrom
feature/boolean-resolvers
Apr 26, 2026
Merged

Added boolean operation resolvers.#15
lextatic merged 2 commits intomainfrom
feature/boolean-resolvers

Conversation

@lextatic
Copy link
Copy Markdown
Contributor

Added boolean expression resolvers.

Resolver Output Type Description
AndResolver bool Returns true only when both boolean operands are true.
NotResolver bool Returns the logical inverse of a boolean operand.
OrResolver bool Returns true when either boolean operand is true.
XorResolver bool Returns true when exactly one boolean operand is true.

@lextatic lextatic added the added New features label Apr 26, 2026
@lextatic lextatic requested a review from Copilot April 26, 2026 19:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds boolean expression resolvers to the Statescript property-resolver system, enabling composition of complex bool conditions directly in graph variable definitions and documenting their usage.

Changes:

  • Introduces AndResolver, OrResolver, NotResolver, and XorResolver (with shared operand type validation via BooleanTypeUtils).
  • Adds unit tests covering resolver behavior, nesting, and operand-type validation.
  • Updates Statescript documentation to describe the new resolvers and expands ExpressionNode docs to include them as valid bool condition inputs.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
docs/statescript/resolvers/and-resolver.md New documentation for AndResolver usage/behavior.
docs/statescript/resolvers/or-resolver.md New documentation for OrResolver usage/behavior.
docs/statescript/resolvers/not-resolver.md New documentation for NotResolver usage/behavior.
docs/statescript/resolvers/xor-resolver.md New documentation for XorResolver usage/behavior.
docs/statescript/resolvers/README.md Adds a “Boolean Expressions” section listing the new resolvers (and ComparisonResolver).
docs/statescript/nodes/condition/expression-node.md Updates docs to reference composed boolean resolvers and refreshes the example.
Forge/Statescript/Properties/BooleanTypeUtils.cs Adds shared validation helper for boolean operand resolvers.
Forge/Statescript/Properties/AndResolver.cs Implements boolean AND resolver.
Forge/Statescript/Properties/OrResolver.cs Implements boolean OR resolver.
Forge/Statescript/Properties/NotResolver.cs Implements boolean NOT resolver.
Forge/Statescript/Properties/XorResolver.cs Implements boolean XOR resolver.
Forge.Tests/Statescript/Resolvers/AndResolverTests.cs Unit tests for AndResolver.
Forge.Tests/Statescript/Resolvers/OrResolverTests.cs Unit tests for OrResolver.
Forge.Tests/Statescript/Resolvers/NotResolverTests.cs Unit tests for NotResolver.
Forge.Tests/Statescript/Resolvers/XorResolverTests.cs Unit tests for XorResolver.
Forge.Tests/Statescript/Nodes/Condition/ExpressionNodeTests.cs Adds integration-style test verifying composed boolean resolvers work as ExpressionNode inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lextatic lextatic merged commit 34e2d85 into main Apr 26, 2026
5 checks passed
@lextatic lextatic deleted the feature/boolean-resolvers branch April 26, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added New features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants