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

Experimental parse error from #93 #99

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
45c4fde
* Renames `crate::resolve::ResolveError` to `crate::resolve::Error`
chanced Oct 21, 2024
e892a48
rename SlicePointer --> PointerIndex (#92)
asmello Oct 22, 2024
5dbf330
Improve `ParseIndexError::InvalidCharacter` error (#94)
asmello Oct 29, 2024
0b60a5c
adds ParseBufError, report::{Report,IntoReport,Subject,ReportErr}
chanced Nov 9, 2024
b48e05b
adds `Index` link to in docs
chanced Nov 9, 2024
16731e1
impls `miette::Diagnostic` for `Report`
chanced Nov 14, 2024
78704a4
refactoring
chanced Nov 14, 2024
1845e56
finishes up this round of the implementation - forgot a few things ea…
chanced Nov 14, 2024
8699be5
test now properly shows the fancy error display
chanced Nov 14, 2024
f69fa55
`Diagnostic::label` -> `Diagnostic::labels`
chanced Nov 15, 2024
112fec5
improves parse error & adds a quick spike test to see miette formatti…
chanced Nov 15, 2024
b78f2a6
Update CHANGELOG.md
chanced Nov 15, 2024
516e9b3
cleans up parse error message
chanced Nov 15, 2024
8550151
resolves a couple of review items
chanced Nov 15, 2024
f507257
impls miette::Report for RichParseError
chanced Nov 15, 2024
3ae2670
start of adding subject to `ParseError`; does not compile
chanced Nov 17, 2024
b3941c9
fixes some compiler errors
chanced Nov 17, 2024
a49393c
spike
chanced Nov 20, 2024
ddcb51e
from impl
chanced Nov 20, 2024
782a7d7
fixes causes
chanced Nov 20, 2024
7f53bd1
theres a bug in display of the error label for pointers which end in ~
chanced Nov 20, 2024
2f98f2b
adds `InvalidEncoding`, fixes `ParseError` error sourcing and display
chanced Nov 21, 2024
529bfa8
adds `first` fn to `Causitive` and `cause` method to all `ParseError`
chanced Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]

### Added

- Adds method `into_buf` for `Box<Pointer>` and `impl From<PathBuf> for Box<Pointer>`.
- Adds method `into_buf` for `Box<Pointer>` and `impl From<PathBuf> for Box<Pointer>`.
- Adds unsafe associated methods `Pointer::new_unchecked` and `PointerBuf::new_unchecked` for
external zero-cost construction.
- Adds `Pointer::starts_with` and `Pointer::ends_with` for prefix and suffix matching.
- Adds new `ParseIndexError` variant to express the presence non-digit characters in the token.
- Adds `Token::is_next` for checking if a token represents the `-` character.
- Adds `InvalidEncoding` enum and corresponding field to `EncodingError` to distinguish between tilde and slash encoding errors

### Changed

- Changed signature of `PathBuf::parse` to avoid requiring allocation.
- Bumps minimum Rust version to 1.79.
- `Pointer::get` now accepts ranges and can produce `Pointer` segments as output (similar to
`slice::get`).
- `PointerBuf::parse` now returns `BufParseError` instead of `ParseError`.

### Deprecated

- `assign::AssignError` renamed to `assign::Error`.
- `resolve::AssignError` renamed to `resolve::Error`.
- `InvalidEncodingError` renamed to `EncodingError`.

### Fixed

Expand Down
Loading