While JavaScript might not be the ideal language to write a production compiler, you might enjoy the “Create Your Own Compiler” tutorial that does an annotated walkthrough of “The Super Tiny ...
It is developed with TSMC 7nm ... Metal programmable ROM compiler - TSMC 152 nm G - Non volatile memory optimized for low power and high density - Dual Voltage - compiler range up to 1024 k Metal ...