Change the code fragments in small improvements post
This commit is contained in:
parent
15f59a7806
commit
3f1db0aa13
|
@ -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 >}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user