Skip to content
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[ux]: refactor preparser #4293

Merged
merged 11 commits into from
Nov 19, 2024
Merged

Conversation

tserg
Copy link
Collaborator

@tserg tserg commented Oct 12, 2024

What I did

This PR consolidates the pre-parsing process into a new PreParser object.

How I did it

How to verify it

Commit message

this PR refactors the pre-parsing routine to use a new `PreParser`
object. this will make it easier in the future to keep track of state
during pre-parsing.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

modification_offsets: dict[tuple[int, int], str] = {}
settings = Settings()
for_parser = ForParser(code)
hex_string_parser = HexStringParser()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed from native_hex_parser

vyper/ast/pre_parser.py Fixed Show fixed Hide fixed
@tserg tserg requested a review from charles-cooper November 17, 2024 07:34
Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's nice, but there is a lot more nesting now

@charles-cooper charles-cooper changed the title refactor[ux]: consolidate preparsing in PreParser object refactor[ux]: refactor preparser Nov 19, 2024
@charles-cooper charles-cooper merged commit 9697bae into vyperlang:master Nov 19, 2024
157 checks passed
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