Move starred expression checks out of parser#1158
Move starred expression checks out of parser#1158slozier merged 1 commit intoIronLanguages:masterfrom
Conversation
50c9382 to
65eae72
Compare
|
@BCSharp do you think this seems like a reasonable approach to post-parsing syntax checks? |
BCSharp
left a comment
There was a problem hiding this comment.
I think it is a good approach. My only concern was about the ordering of the checks (it comes after namebinding syntax errors are reported), but it appears this is exactly what CPython does as well, so all is well.
A few other things that caught my eye, I'm pretty sure you know this, but just for the record:
- Going through
compile(ast.parse(...), ...)does not work, even for valid cases; I assume this is for another PR, maybe a one that finishes off #686? - Starting from Python 3.5, the error message "can use starred expression only as assignment target" is replaced by "can't use starred expression here", I assume this will get changed in #1153?
Ah, I knew there was a starred expression issue somewhere, good catch. I guess this solved half the issue. Will take a look at the second half in a separate PR (if I don't forget about it).
Indeed, 3.5 will change a bunch of things in this walker, but it seemed like a good idea to work this out separately from the other PR. |
Moves the starred expression checks out of parser which resolves the following: