I have the implementation for languages 7 and 8 but it's too big to fit in this comment section.
I'm just joking. This is cool stuff you made.