-
-
Notifications
You must be signed in to change notification settings - Fork 822
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
refactor[parser]: remove ASTTokens
#4364
refactor[parser]: remove ASTTokens
#4364
Conversation
i find the name |
can we generalize this code? it's pretty much the same thing 3 times Lines 289 to 324 in 5c1fb8b
|
vyper/ast/pre_parser.py
Outdated
@@ -166,6 +166,10 @@ class PreParser: | |||
settings: Settings | |||
# A mapping of class names to their original class types. | |||
modification_offsets: dict[tuple[int, int], str] | |||
|
|||
# Magic adjustments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make a better comment hehe
What I did
remove asttokens from the parse machinery, since the method is buggy (see below bugs) and slow (#4272). brings down parse time (time spent in ast generation) between 40-70%.
fixes multiple tokenizer-related bugs, including
How I did it
another way to adjust tokens
How to verify it
Commit message
Description for the changelog
Cute Animal Picture