An abstract syntax tree (AST) is a structure that holds all of the important information of a program in a tree format loosely corresponding to the syntax of the language. Each node in the AST corresponds to some syntactic element of the program.