Skip to content

Conversation

@swalkinshaw
Copy link
Contributor

@swalkinshaw swalkinshaw commented Nov 11, 2025

Follow-up to #72

The Parse trait now returns ParseDetails instead of a Result to more accurately reflect that result information will always be returned and not only for success cases.

This exposes the token count now regardless of success or failure. Even when the parser returns an error, there's still a token count.

@swalkinshaw swalkinshaw force-pushed the parser-improve-result branch 2 times, most recently from 5e1344b to 7cb7ec4 Compare November 11, 2025 21:33
@swalkinshaw swalkinshaw changed the title Return ParseResult from Parse trait instead of Result directly Return ParseDetails from Parse trait instead of Result directly Nov 11, 2025
@swalkinshaw swalkinshaw force-pushed the parser-improve-result branch from 7cb7ec4 to 87ffe6b Compare November 12, 2025 18:18
The Parse trait now returns `ParseDetails` instead of a `Result` to more
accurately reflect that result information can always be returned and
not only for success cases.

This exposes the token count now regardless of success or failure. Even
when the parser returns an error, there's still a token count.
@swalkinshaw swalkinshaw force-pushed the parser-improve-result branch from 87ffe6b to c9c3f39 Compare November 12, 2025 18:25
@swalkinshaw swalkinshaw merged commit 91bd69a into main Nov 13, 2025
4 checks passed
@swalkinshaw swalkinshaw deleted the parser-improve-result branch November 13, 2025 18:20
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.

2 participants