Add base, string and custom datatypes

Data types have format functions which return string representations of
what has been parsed.

Custom datatypes can be parents of other datatypes and rely on them to
format data for them.