You can map this syntax to a Lisp (be Common Lisp or Scheme) with ease. Macros will do the 90% of the job for this.
There's some Common Lisp package to code for the web:
https://github.com/rabbibotton/clog
No AI gen would be needed if the game can be structured enough a la GB Studio.