Add a hook for a callback that takes the parse tree.