Support return value annotations in functions#88
Support return value annotations in functions#88pchaigno wants to merge 1 commit intoatom:masterfrom pchaigno:fix-function-header
Conversation
The semi-colon marking the end of a function header is not necessary preceded by a closing parenthesis
|
re: Isn't #95 the same as this one? I'm not quite sure about your changes (otoh, I haven't tried to run them yet... but I don't know how to do it, either... I know only how to run tests, and this PR doesn't make any change to tests): you removed stuff from the regexps, so I'm a bit confused as how this could actually parse correctly the Is the test that I wrote in #95 potentially useful to be reused? Good to know that you're working on it :) |
But mine's older 😜
I'll try to take a look at this over the week-end (I'll add on your PR if it's more complete than mine ;). |
|
Sure Since you seem to be more knowledgeable about this project than me: Do you have any pointers/documentation? The README is pretty laconic |
|
@pchaigno any chance of getting this in? The highlighting is completely broken to the point of distraction for code with return annotations at the moment. |
|
@pwaller https://github.com/MagicStack/MagicPython See also |
This pull request adds support for return value annotations in functions (as requested in #68) and fixes an error reported in #86.
See the fix in Lightshow.
It loses the
invalid.illegalscope for function headers without a terminating:. I couldn't find a way to keep it. Though, most of the time, you can still clearly see that it's missing.