[Discussion] Writing a transpiler from PHP to polyglot PHP+C code

Made a small prototype here, very standard thing: pholyglot/src at main · olleharstedt/pholyglot · GitHub

Parser and lexer in Menhir, AST that represents the subset PHP lang, then I’d have to iterate over it to infer some types, transform to polyglot AST and from there to string.

The one thing to make it more professional would be proper error messages for the end user… But you have to carry file and line in the AST, right? Maybe I can google around. :thinking: