when grep-ing I find it quite useful to always have proc/func/template/macro before the proc name so I can easily distinguish between definitions and call sites.
And what Araq said about the AST. Working with type sections or const/let/var I always opt to create a separate one when generating code because it's easier. And for parsing it would require supporting the 2 kinds of definitions.
