Add type annotations to parser