Adding optional type annotations to the parser