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

Expose extension function calls in AST package #59

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

micahhausler
Copy link
Contributor

Issue #, if available:

Resolves #54

Description of changes:

This change adds support for specifically calling extension functions in the AST package.

Copy link
Collaborator

@patjakdev patjakdev left a comment

Choose a reason for hiding this comment

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

Love it! Thank you @micahhausler.

ast/ast_test.go Outdated
func TestAstExamples(t *testing.T) {
t.Parallel()
// This example shows how you can construct polcies with the ast package
func ExampleNode() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, thank you! We've been meaning to do this.

I think we could actually elevate these up to just Example() so that they appear right at the top of the documentation.

@micahhausler
Copy link
Contributor Author

Fixed conflicts, updated test example to package-level Example().

@patjakdev patjakdev merged commit 1a0d55f into cedar-policy:main Nov 10, 2024
3 checks passed
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.

Allow extension call nodes to be programmatically added to the AST
2 participants