When I first learned C++, using cfront in the late 80's, lots of the language was implemented as C pre-processor macros.
You can even check out how it was done: https://github.com/seyko2/cfront-3/blob/master/src/template....