Reworked parsing of preprocessed entities.

Fixes macro expansions and translation units processing.