pabloerhard/pogo ? reverse-engineered prompt
Reverse engineered prompt
Build me a compiler for a small programming language called Pogo in Go.
I want it to read a Pogo source file, check the syntax and types, generate intermediate code, save it to a compiled file, and then run it in a simple virtual machine. It should support variable declarations, int and float values, basic arithmetic, function calls, if statements, while loops, and print output. Comments should work too, including multiline comments.
Please include a couple of sample programs like factorial and Fibonacci so I can see it working. Keep the language rules simple, like variables being declared at the start of the program or at the start of a function. If you need to look up anything about the latest Go tooling or compiler patterns, go ahead and check current docs online.