Code to build AST.