Skip to content

Conversation

TristonianJones
Copy link
Collaborator

Allow macro implementations to indicate a non-expansion by returning an empty Expr value.

In the cel-cpp project an empty Expr return value indicates a non-match, so this change ensures
that the capabilities of cel-go and cel-cpp are at parity.

Copy link
Collaborator

@jnthntatum jnthntatum left a comment

Choose a reason for hiding this comment

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

LGTM but consider using nil instead of default expr message as a sentinel value.

@TristonianJones
Copy link
Collaborator Author

PTAL.

@jnthntatum jnthntatum merged commit 10141a6 into google:master Nov 4, 2022
TristonianJones added a commit to TristonianJones/cel-go that referenced this pull request Nov 8, 2022
…gle#605)

* Allow macros to return an empty Expr to indicate a non-expansion at the implementation level

* Switch from empty Expr to nil expr to indicate non-expansion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants