Я нашел точное решение моего вопроса в помощи Vim, и я публикую его здесь на случай, если кому-то понадобится это в будущем. Это именно то, что я хочу: способ прочитать код и выделить его соответствующим образом.
syntax.txt
Раздел 15: Подсветка меток
[...]
Only highlighting typedefs, unions and structs can be done too. For this you
must use Exuberant ctags (found at http://ctags.sf.net).
Put these lines in your Makefile:
# Make a highlight file for types. Requires Exuberant ctags and awk
types: types.vim
types.vim: *.[ch]
ctags --c-kinds=gstu -o- *.[ch] |\
awk 'BEGIN{printf("syntax keyword Type\t")}\
{printf("%s ", $$1)}END{print ""}' > $@
And put these lines in your .vimrc: >
" load the types.vim highlighting file, if it exists
autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim'
autocmd BufRead,BufNewFile *.[ch] if filereadable(fname)
autocmd BufRead,BufNewFile *.[ch] exe 'so ' . fname
autocmd BufRead,BufNewFile *.[ch] endif