Skip to content

Conversation

@joehendrix
Copy link
Contributor

@joehendrix joehendrix commented Sep 26, 2025

This introduces a datatype for a range of characters in a source file. It will be used for embedding source information in the AST for #112 , but is currently only being added to info trees.

This PR also removes the extra syntax elements from error handling as messages contain source information.

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

atomb
atomb previously approved these changes Sep 26, 2025
Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

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

I like this, though I had one minor terminology comment. And could you update the PR description before merging?

@joehendrix joehendrix changed the title Introduce source locations and cleanup error handling. Introduce source ranges, replace syntax with source ranges in info trees, and cleanup error handling. Sep 27, 2025
@joehendrix joehendrix changed the title Introduce source ranges, replace syntax with source ranges in info trees, and cleanup error handling. Introduce source ranges so that we can remove Lean syntax references from Strata info trees, and cleanup error handling. Sep 27, 2025
@joehendrix joehendrix changed the title Introduce source ranges so that we can remove Lean syntax references from Strata info trees, and cleanup error handling. Introduce source ranges and cleanup error handling. Sep 29, 2025
@joehendrix joehendrix requested a review from atomb September 29, 2025 02:09
@aqjune-aws
Copy link
Contributor

I would like to see whether the newly embedded source locations work - could you instruct me how I can test it?

@joehendrix
Copy link
Contributor Author

The LoadDialect test uses the error locations to print error messages.

The source locations are still restricted to the info trees in this PR. #112 adds support to all the DDM types, but is a large PR, and I am merging in pieces (including this one). We can have better tests once #112 is finally merged in.

Copy link
Contributor

@aqjune-aws aqjune-aws left a comment

Choose a reason for hiding this comment

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

I see - thanks for clarification!

@joehendrix joehendrix added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit 907d072 Oct 6, 2025
10 checks passed
@joehendrix joehendrix deleted the jhx/errors branch October 6, 2025 21:48
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