Conversation
Add support for inline conjunction blocks (AND/OR) within predicate
definitions. This allows users to write nested predicates directly in
their definitions, which are then lifted into anonymous predicates during
the lowering pass.
Example:
```
my_pred(A, B) = AND(
AND(
Equal(A["foo"], 123)
)
Equal(A["bar"], B)
)
```
Gets transformed into:
```
my_pred$anon_0(A) = AND(Equal(A["foo"], 123))
my_pred(A, B) = AND(my_pred$anon_0(A), Equal(A["bar"], B))
```
Key changes:
- Grammar: Add inline_conjunction and predicate_call rules
- AST: Add StatementTmplKind enum with Call and InlineConjunction variants
- Lifting: New frontend_ast_lift.rs with AnonPredicateLifter
- Validation: Handle inline conjunction validation
- Lower: Call lifting pass before splitting
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
125d34f to
5eb5bdd
Compare
d46530b to
0beb632
Compare
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.
Add support for inline conjunction blocks (AND/OR) within predicate definitions. This allows users to write nested predicates directly in their definitions, which are then lifted into anonymous predicates during the lowering pass.
Example:
Gets transformed into:
Key changes: