Open
Conversation
BREAKING CHANGES: - Lexer API now returns Result<Token, LexicalError> instead of Token - Removed internal error accumulation from Lexer struct - Removed TokenKind::Unknown variant used for error recovery - Replace lexer error vector with immediate error propagation - Introduce unified SmilesError enum with Lexical/Parse variants - Remove problematic LexicalError to ParseError conversion - Update main.rs to handle new lexer API - Add comprehensive test coverage for unified error system Benefits: Clear error separation, type-safe handling, better reporting
- Remove ParserState struct and consolidate into single Parser impl - Eliminate token buffering: parse directly from iterator - Convert all parsing methods to static/associated functions - Pass line_iter and current_token through parsing call stack - Maintain all existing parsing functionality and error handling - Add streaming parser demo to showcase true streaming behavior - All tests continue to pass, confirming correctness of refactor This achieves a cleaner, more efficient streaming parser that processes tokens one-by-one without intermediate buffering or state structs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add token stream