Closed regnerjr closed 9 years ago
We want to keep the extra scope information that we are in a function declaration body when possible so this wasn't the best fix. I've improved the behavior in a2b1720ad623212d2e5ae13b6c08dc64ebdc0bc1, it's not perfect but it covers this issue. Thanks for the pull requests.
Previous matches for function declaration looked for a
func
keyword and ended with a }. This search for a closing curly brace caused functions declared in a protocol to have incorrect syntax hi-lighting. I have changed the function-declaration and function-result to end at $ to correct the hi-lighting for protocols.Also fixed a funcition typo.