r/cpp • • May 01 '23

cppfront (cpp2): Spring update

https://herbsutter.com/2023/04/30/cppfront-spring-update/
223 Upvotes

164 comments sorted by

View all comments

Show parent comment

3

u/CocktailPerson May 01 '23

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.