First version of a def/ref scanner for a single source file, that can
provide some semantic highlighting information to the editor.
For def/ref scanning, distinguish const and function fields from normal
fields.