This is nothing new. C compilers have been written in C. Python has been written in Python.
It’s possible to use a compiler for Language X
to compile a newer version of itself, with more features. It’s called bootstrapping.
- Bootstrapping a language
- Writing a compiler in its own language
- How do you write a compiler for a language in that language?
- Bootstrapping a compiler: why?
BTW, if you want to learn more about compilers, despite having missed out at uni, have a look at Learning to write a compiler — specifically, the Dragon Book.