Vim scripting newbie here, trying to write a syntax file for an ML-like language.
What I'm trying to do is apply type syntax highlighting rules to type annotations that exist to the right of a colon and inside of parentheses.
let foo (arg1 : Int) (arg2 : Maybe b) (arg3 : a -> b)
^^^ ^^^^^^^ ^^^^^^
I'm aware this is less of a question and more of a "please help" (apologies!), but I've been banging my head against this for a while and I really have no idea how I'm supposed to be tackling it. Should I be doing some sort of recursion, or does it require some regex wizardry, or some other clever vim tricks I'm unaware of.