Skip to content

Conversation

cdisselkoen
Copy link
Contributor

Description of changes

Instead of our own SourceInfo struct, we can use miette::SourceSpan directly. This provides some efficiency, and allows removing the code and impls for SourceInfo.

This will also make #182 easier.

This PR also swaps the values in the return pair of ASTNode::as_inner_pair() for consistency with ASTNode::into_inner().

Issue #, if available

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

  • A change "invisible" to users (e.g., documentation, changes to "internal" crates like cedar-policy-core, cedar-validator, etc.)

I confirm that this PR (choose one, and delete the other options):

  • Does not update the CHANGELOG because my change does not significantly impact released code.

I confirm that cedar-spec (choose one, and delete the other options):

  • Does not require updates because my change does not impact the Cedar Dafny model or DRT infrastructure.

Disclaimer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@shaobo-he-aws shaobo-he-aws left a comment

Choose a reason for hiding this comment

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

LGTM.

@cdisselkoen cdisselkoen force-pushed the cdisselkoen/direct-sourcespan branch from 23795ca to 6a12d16 Compare December 7, 2023 21:02
@cdisselkoen cdisselkoen force-pushed the cdisselkoen/direct-sourcespan branch from 6a12d16 to 1746239 Compare December 7, 2023 22:17
@cdisselkoen cdisselkoen merged commit 13ea527 into main Dec 8, 2023
@cdisselkoen cdisselkoen deleted the cdisselkoen/direct-sourcespan branch December 8, 2023 13:42
shaobo-he-aws added a commit that referenced this pull request May 20, 2025
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.

3 participants