Pre-compute the module range for LALRPOP parser#10879
Merged
dhruvmanila merged 1 commit intodhruv/parserfrom Apr 11, 2024
Merged
Pre-compute the module range for LALRPOP parser#10879dhruvmanila merged 1 commit intodhruv/parserfrom
dhruvmanila merged 1 commit intodhruv/parserfrom
Conversation
MichaReiser
approved these changes
Apr 11, 2024
Member
|
Oh no, the formatter fails now. I think we need to fix ruff/crates/ruff_python_formatter/src/module/mod_module.rs Lines 19 to 23 in e2ec425 to count the lines after |
Member
|
I went ahead and pushed the fix. I hope that's okay with you |
Member
Author
|
Thank you! |
5c117e7 to
d2d4b3e
Compare
dhruvmanila
added a commit
that referenced
this pull request
Apr 11, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
CodSpeed Performance ReportMerging #10879 will degrade performances by 5.27%Comparing Summary
Benchmarks breakdown
|
Member
Author
|
Ugh, I force pushed the branch and removed your change, I'll fix this. |
dhruvmanila
added a commit
that referenced
this pull request
Apr 12, 2024
dhruvmanila
added a commit
that referenced
this pull request
Apr 15, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
dhruvmanila
added a commit
that referenced
this pull request
Apr 15, 2024
dhruvmanila
added a commit
that referenced
this pull request
Apr 16, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
dhruvmanila
added a commit
that referenced
this pull request
Apr 16, 2024
dhruvmanila
added a commit
that referenced
this pull request
Apr 16, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
dhruvmanila
added a commit
that referenced
this pull request
Apr 16, 2024
dhruvmanila
added a commit
that referenced
this pull request
Apr 17, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
dhruvmanila
added a commit
that referenced
this pull request
Apr 17, 2024
dhruvmanila
added a commit
that referenced
this pull request
Apr 18, 2024
## Summary This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.
dhruvmanila
added a commit
that referenced
this pull request
Apr 18, 2024
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.
Summary
This PR updates the LALRPOP to use the complete source range for module by looking at the tokens before the parsing begins. This means the module range now corresponds to the actual source even if it only contains trivia tokens. This is mainly so that the fuzzer doesn't crash because the AST doesn't match.