Improve highlighting of in.#169
Conversation
This highlights both `in` keywords in multi-iterable `for` loops, and adds highlighting when `in` is used to check if an element is contained in an array.
|
Can you please add some tests, eg the cases mentioned in #148? You will find examples in the current test script with names like |
|
|
|
@non-Jedi I didn't see your comment before pushing my commit. As a newbie user, I think it would help to font-lock |
|
My most convincing objection is that I kinda get it. Infix function symbols are parsed in a way that's different from normal symbols. |
|
Sure, the more I thought of that and played with edge cases, the more I agree with you. Clearly, that makes a fix much harder, as you mentioned in the issue. I still have a couple ideas I'd like to try, but it'll be a few days before I can get back to this. |
|
FWIW, I would prefer just font-locking in |
|
@mcol, would you be interested in updating this pull request just to add the multi-loop |
This highlights both
inkeywords in multi-iterableforloops (#148), and adds highlighting in the cases whereinis used to check if an element is contained in an array, as inif 2 in [1, 2, 3].