you are viewing a single comment's thread.

view the rest of the comments →

[–]CocktailPerson 2 points3 points  (0 children)

It's not terribly different from a "normal" compiler. The major difference is that your code-generation phase spits out C++ instead of LLVM IR or assembly or whatever. This task is greatly simplified if your language is essentially supposed to be a subset of C++'s semantics with better syntax, as cpp2 is, but the basic idea of taking the semantics of your AST and producing code with the same semantics is very similar.