Open BekaValentine opened 2 years ago
I don't know enough about the testing library to properly implement tests for this, unfortunately.
@maxbrunsfeld would you be up for reviewing this?
I tried your patch and currently everything looks good to me.
Except the print
is highlighted as a keyword and built-in exception class is not highlighted.
Before:
After:
Note: I disabled the built-in language-python 0.53.6 package and cloned language-python master branch (HEAD=fd71825) with your patch applied under .atom/packages directory.
Description of the Change
This PR adds keywords for the new match statements that were added to Python 3.10.
It does so by making them instances of 'keyword.control.conditional.python'.
Alternate Designs
One alternative option would be to have a separate type for the match statement keywords, however, match statements are arguably a flavor of conditional statement. For example,
is functionally the same as
Benefits
Python 3.10 will highlight correctly in Atom.
Possible Drawbacks
Code for previous versions of Python could have erroneous highlighting.
Applicable Issues
(https://github.com/atom/language-python/issues/335)