Skip to content

Conversation

@1st1
Copy link
Contributor

@1st1 1st1 commented Aug 14, 2015

This PR changes the implementation of async/await support.

Instead of classifying 'async' as a 'storage modifier' keyword, it is now correctly classified as a 'control flow' one.

'async def' must be parsed as part of "function.python" scopes, in order for ⌘R to work correctly.

Please see the attached screenshots of how the changes look on real code.

One more detail: the PR updates the list of built-in exceptions & warning classes. It also stops highlighting /(\w+)Error/ kind of exceptions as built-ins.

P.S. This is a second PR -- the first one was against the master branch by accident.

screen shot 2015-08-14 at 1 08 47 pm

screen shot 2015-08-14 at 1 08 20 pm

Also, stop highlighting 'AbracadabraError' as a built-in error class.
@MattDMo
Copy link
Owner

MattDMo commented Sep 5, 2015

Looks good. Why did you remove async from invalid.illegal.name.python?

@1st1
Copy link
Contributor Author

1st1 commented Sep 5, 2015

Looks good. Why did you remove async from invalid.illegal.name.python?

Because when you start typing 'async' it flashes it as invalid, and then it only becomes properly highlighted once you finish typing def, with or for. In some colour schemes, invalid scope is super prominent (in mine it's red background and white foreground), so it's very annoying.

BTW, I'm currently using the unicode branch with this commit on top, and it highlights all my source code just fine. I think it's ready for merging into master.

MattDMo pushed a commit that referenced this pull request Sep 5, 2015
Better scopes for "async def"; Add all built-in exceptions and warnings.
@MattDMo MattDMo merged commit 5da56b0 into MattDMo:unicode Sep 5, 2015
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