Closed hankache closed 8 years ago
I could make is
highlight as a function when it's the first thing on a line (or preceded by an opening delimiter). I don't want to lose is
being highlighted as a keyword when applying traits. Though perhaps it would look alright as a function. I'll do some experimenting.
However, what if someone has their function declaration separated over a few lines:
sub foo(Str $a, Str $b, Int $c)
is rw
is export
{
$a ~ $b + $c
}
That would highlight is
as a function if I followed the heuristic described in my previous comment.
@hankache after some consideration, I can't think of a good rule for when is
is a trait_mod op and when it's a Test function. Let me know if you think of something that could work.
As shown in the screen shot, the test functions
cmp-ok
,can-ok
anddoes-ok
are not highlighted. In addition the functionis
is being highlighted as if it was a trait.