Add support for syntactic classification.

Tests pending.
Quick comment explaining how you are traversing.