Closed dkearns closed 2 years ago
LGTM.
I don't quite get what you mean about highlighting flickering but I'm happy with this when you are.
If we limit the lookbehind to only allow one WS char between extern
and alias
then if there's anymore than that, perhaps just temporarily while editing, we lose highlighting of alias
. An 'unrestricted' lookbehind can be slow but, as a compromise, allowing for half a dozen or so WS chars makes them feel more like independent keywords when editing.
I find this sort of thing sometimes trips me up in unfamiliar languages.
OK that's sensible, thanks
Limit the lookbehind to 16 chars. It's unlikely this is ever formatted with more than one whitespace char but this gives enough margin for extraneous whitespace while editing without the highlighting flickering on and off.
Matching
\<extern\s\+alias\>
highlights the intervening whitespace which annoys users with background highlighting of keywords.