I am used to the way Sublime Text highlights function declarations vs function calls and am trying to emulate something similar with Vim. There are posts addressing something like this, but they seem to highlight declarations and calls the same way.
int function1() {
function3();
}
int function2()
{
...
}
Here, function1 and function2 should be of one color and function3 should be of another color. I am trying to write regular expressions to match each of these cases and then going from there.
So far, I came up with
syn match cFunDecl "\zs\w\+\ze(.*){"
syn match cFunCall "\zs\w\+\ze(.*);"
These don't really seem to work. Following this approach, I also expect to run into issues with header files where declarations are highlighted as calls but will probably deal with that later.