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

feat: spans #34

Closed
norskeld opened this issue Jul 12, 2022 · 2 comments · Fixed by #71
Closed

feat: spans #34

norskeld opened this issue Jul 12, 2022 · 2 comments · Fixed by #71
Assignees
Labels
A-combinators Area: Issues related to combinators A-parsers Area: Issues related to parsers C-feature-accepted Category: A feature request that has been accepted and awaiting implementation P-high Priority: High R-released Semantic Release: Success

Comments

@norskeld
Copy link
Owner

norskeld commented Jul 12, 2022

After working with some rust parser combinator libraries like chumsky, I feel like it would be really handy to provide capabilities to either produce spans by default, or allow to map with spans.

A span is simply a pair of numbers, a tuple like [start: number, end: number], which points to some range in the source code we are parsing or parsed. That is actually a must for quality error reporting and diagnostics.

@norskeld norskeld added the feat New feature or request label Jul 12, 2022
@norskeld norskeld self-assigned this Jul 12, 2022
@norskeld
Copy link
Owner Author

norskeld commented Jan 2, 2023

Spans will be provided by default on Result<T> objects and in map combinators (see #53). Hopefully overhead will be tolerable.

@norskeld norskeld added A-parsers Area: Issues related to parsers A-combinators Area: Issues related to combinators C-feature-accepted Category: A feature request that has been accepted and awaiting implementation P-high Priority: High and removed feat New feature or request labels Jan 16, 2023
@norskeld
Copy link
Owner Author

🎉 This issue has been resolved in version 3.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@norskeld norskeld added the R-released Semantic Release: Success label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-combinators Area: Issues related to combinators A-parsers Area: Issues related to parsers C-feature-accepted Category: A feature request that has been accepted and awaiting implementation P-high Priority: High R-released Semantic Release: Success
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant