Merged
Conversation
Major refactoring of the codebase: - Replace Pest.rs PEG parser with nom combinator parser - Removes pest/pest_derive dependencies - New parser.rs module with cleaner, more idiomatic parsing - Full test coverage for all grammar constructs - Simplify HTML documentation scraper - New doc_scraper.rs with streamlined HTML extraction - Cleaner handling of function signatures and optional params - Better structured ScrapedFunction type - Consolidate output generation - New output.rs module for LuaCATS stub generation - Unified handling of classes, fields, and functions - Cleaner separation of concerns - Remove legacy modules - Removed: luars.rs, luars.pest, scrape.rs, stub.rs, finstub.rs, fixes.rs - Main.rs now ~45 lines instead of ~100 - Minor output improvements - Consistent spacing in function type signatures (a: number vs a:number) All 17 tests pass. Output is functionally equivalent to baseline.
- Run cargo tests on push/PR to main/master - Verify generated stub.lua matches committed version - Uses only GitHub's official actions/checkout (no third-party actions)
Changed type expression parsing to capture strings verbatim using recognize() instead of parsing and reconstructing. This preserves the original formatting from playdate.luars including spacing in function type parameters. Output now matches the original exactly.
- Add new luars.pest grammar with clean, documented rules - Add luars.rs module with idiomatic Pest-based parser - Remove nom-based parser.rs - Update dependencies: pest/pest_derive instead of nom - All 16 tests pass, stub.lua output unchanged
Nested/indented list items (e.g., ' * item') were getting extra line breaks between them because they weren't being detected as list items. Now trim leading whitespace before checking for '* '.
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.
Major refactoring of the codebase:
All 17 tests pass. Output is functionally equivalent to baseline.
Output changes reflected here: