diff --git a/docs/tutorial/LangImpl2.html b/docs/tutorial/LangImpl2.html index 1fdd442c651..510c9377e2e 100644 --- a/docs/tutorial/LangImpl2.html +++ b/docs/tutorial/LangImpl2.html @@ -753,20 +753,40 @@ $ +
There is a lot of room for extension here. You can define new AST nodes, +extend the language in many ways, etc. In the next +installment, we will describe how to generate LLVM IR from the AST.
+ + + + + + + +-Here is the full code. Note that it is fully self-contained: you don't even -need LLVM for this. In the next installment, we -will describe how to generate LLVM IR from the AST.
+Here is the complete code listing for this and the previous chapter. +Note that it is fully self-contained: you don't need LLVM or any external +libraries at all for this (other than the C and C++ standard libraries of +course). To build this, just compile with:-// To build this: -// g++ -g toy.cpp -// ./a.out + # Compile + g++ -g toy.cpp + # Run + ./a.out ++
Here is the code:
+ +#include <cstdio> #include <string> -#include < +#include <map> #include <vector> //===----------------------------------------------------------------------===//