From 3f1db0aa13749a5c132ce4ddfcc84dca0c413360 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 27 Aug 2019 00:45:51 -0700 Subject: [PATCH] Change the code fragments in small improvements post --- content/blog/04_compiler_improvements.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/blog/04_compiler_improvements.md b/content/blog/04_compiler_improvements.md index 6b90e07..436dd79 100644 --- a/content/blog/04_compiler_improvements.md +++ b/content/blog/04_compiler_improvements.md @@ -69,7 +69,7 @@ but we don't need indentation, or recursion: {{< codelines "C++" "compiler/04/ast.cpp" 116 121 >}} Let's print the bodies of each function we receive from the parser: -{{< codelines "C++" "compiler/04/main.cpp" 44 53 >}} +{{< codelines "C++" "compiler/04/main.cpp" 41 56 >}} ### Printing Types Types are another thing that we want to be able to inspect, so let's @@ -82,7 +82,7 @@ The implementation is simple enough: {{< codelines "C++" "compiler/04/type.cpp" 5 24 >}} Let's also print out the types we infer. We'll make it a separate loop -in the `typecheck_program` function, because it's mostly just +at the bottom of the `typecheck_program` function, because it's mostly just for debugging purposes: {{< codelines "C++" "compiler/04/main.cpp" 34 38 >}}