Add a function to tag parse tree