added typing statements to AST and parser