[task] put creation of ParseTree in own class