From a quick glance that might be wrong:
It looks like the walk function visits an abstract syntax tree (AST) and performs checks for the statics part of the compiler. E.g., it finds unused variables and functions, type-illegal statements and so on. The term "walk" is used as in that it "walks over the tree and visits each node". The purpose is likely to set up the AST in a state where it is well-typed. This simplifies later stages of the compiler as it can assume certain well-formed principles of the AST structure.
J.