-
-
Notifications
You must be signed in to change notification settings - Fork 805
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
feat: require type annotations for loop variables #3596
Merged
charles-cooper
merged 56 commits into
vyperlang:master
from
tserg:feat/loop_var_annotation2
Jan 7, 2024
Merged
Changes from 2 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
0dcb40e
wip
tserg 6aacc2c
Merge branch 'master' of https://github.com/vyperlang/vyper into feat…
tserg dabe7e7
apply bts suggestion
tserg 899699e
fix for visit
tserg 8d9b2ef
clean up prints
tserg bc5422a
update examples
tserg deb860f
delete py ast key
tserg 2c2792f
remove prints
tserg daef0b7
fix exc in for
tserg f644f8a
update grammar
tserg 49ad2cd
update tests
tserg 635e0c0
fix tests
tserg 42e06f5
fix lint
tserg e7a4612
revert a change
charles-cooper 6f6acea
add visit_For in py ast parse
tserg 578d471
remove typechecker speculation
tserg 07fcde2
remove prints
tserg 76c3d2d
fix sqrt
tserg 9db7a36
fix visit_Num
tserg e055ee9
update comments
tserg c7acdaa
fix tests
tserg 0dd86fd
fix lint
tserg f64e6f1
fix mypy
tserg b913d45
Merge branch 'feat/loop_var_annotation2' of https://github.com/tserg/…
tserg 5bc54c0
simpliy visit_For
tserg b951b47
rewrite for loop slurper with a small state machine
charles-cooper 3c5c0cb
rewrite visit_For, use AnnAssign for the target
charles-cooper fe6721c
add a comment
charles-cooper f74fe50
fix lint
charles-cooper c5bcb9b
fix comment in for parser
tserg 01cc34b
fix For codegen
tserg 2948dc7
call ASTTokens ctor for side effects
tserg 54c31b8
fix visit_For semantics
tserg ef7841f
replace ctor with mark_tokens
tserg 1caba88
fix more codegen
tserg 62208d5
fix tests
tserg c140574
improve diagnostics for For
tserg 58c1356
update tests
tserg d068ebb
revert var name
tserg 296ea7c
minor refactor
tserg 7e45133
fix test
tserg 2722b10
fix grammar test
tserg 5bbbb96
remove TODO
tserg 6b72c38
revert empty line
tserg 8fe23c9
clean up For visit
tserg f329bb4
add test
tserg 77d9bd3
rename iter_type to target_type to be consistent with AST
charles-cooper 7dbdee6
remove a dead parameter
charles-cooper 7cbc854
fix a couple small lint bugs
charles-cooper b4f3c39
fix exception messages for folded nodes
charles-cooper 0d759c7
fix lint
charles-cooper 9dcac6c
allow iterating over subscript
charles-cooper 2351bb2
revert removed tests
charles-cooper 6e04ed5
rename some variables
charles-cooper afb3215
clarify a comment
charles-cooper 9678f91
rename a function
charles-cooper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
i think instead of passing around
loop_var_annotations
everywhere we should just tag it on the AST during theannotate_vyper_ast
portion of ast parsing.