diff --git a/Cargo.toml b/Cargo.toml index 8e43b18..df2b843 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ include = ["LICENSE", "Cargo.toml", "src/**/*.rs"] resolver = "2" members = [ "ast", "core", "format", "literal", "parser", + "ast-pyo3", "ruff_text_size", "ruff_source_location", ] diff --git a/ast-pyo3/.gitignore b/ast-pyo3/.gitignore new file mode 100644 index 0000000..af3ca5e --- /dev/null +++ b/ast-pyo3/.gitignore @@ -0,0 +1,72 @@ +/target + +# Byte-compiled / optimized / DLL files +__pycache__/ +.pytest_cache/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +.venv/ +env/ +bin/ +build/ +develop-eggs/ +dist/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +include/ +man/ +venv/ +*.egg-info/ +.installed.cfg +*.egg + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt +pip-selfcheck.json + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject + +# Rope +.ropeproject + +# Django stuff: +*.log +*.pot + +.DS_Store + +# Sphinx documentation +docs/_build/ + +# PyCharm +.idea/ + +# VSCode +.vscode/ + +# Pyenv +.python-version \ No newline at end of file diff --git a/ast-pyo3/Cargo.toml b/ast-pyo3/Cargo.toml new file mode 100644 index 0000000..80bddd3 --- /dev/null +++ b/ast-pyo3/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "rustpython-ast-pyo3" +version = "0.1.0" +edition = "2021" + +[features] +# This feature is experimental +# It reimplements AST types, but currently both slower than python AST types and limited to use in other API +wrapper = [] + +[lib] +name = "rustpython_ast" +crate-type = ["cdylib"] + +[dependencies] +rustpython-ast = { workspace = true, features = ["location"] } +rustpython-parser = { workspace = true } +num-complex = { workspace = true } +once_cell = { workspace = true } + +pyo3 = { workspace = true, features = ["num-bigint", "num-complex"] } diff --git a/ast-pyo3/pyproject.toml b/ast-pyo3/pyproject.toml new file mode 100644 index 0000000..f5e1aac --- /dev/null +++ b/ast-pyo3/pyproject.toml @@ -0,0 +1,15 @@ +[build-system] +requires = ["maturin>=0.15,<0.16"] +build-backend = "maturin" + +[project] +name = "rustpython_ast" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Rust", + "Programming Language :: Python :: Implementation :: CPython", +] + + +[tool.maturin] +features = ["pyo3/extension-module"] diff --git a/ast-pyo3/src/gen/to_py_ast.rs b/ast-pyo3/src/gen/to_py_ast.rs new file mode 100644 index 0000000..5038867 --- /dev/null +++ b/ast-pyo3/src/gen/to_py_ast.rs @@ -0,0 +1,4841 @@ +// File automatically generated by ast/asdl_rs.py. + +impl PyNode for ast::Mod { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ModModule { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ModInteractive { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ModExpression { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ModFunctionType { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Stmt { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtFunctionDef { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAsyncFunctionDef { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtClassDef { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtReturn { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtDelete { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAssign { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAugAssign { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAnnAssign { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtFor { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAsyncFor { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtWhile { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtIf { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtWith { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAsyncWith { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtMatch { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtRaise { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtTry { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtTryStar { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtAssert { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtImport { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtImportFrom { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtGlobal { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtNonlocal { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtExpr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtPass { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtBreak { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::StmtContinue { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Expr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprBoolOp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprNamedExpr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprBinOp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprUnaryOp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprLambda { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprIfExp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprDict { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprSet { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprListComp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprSetComp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprDictComp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprGeneratorExp { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprAwait { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprYield { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprYieldFrom { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprCompare { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprCall { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprFormattedValue { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprJoinedStr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprConstant { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprAttribute { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprSubscript { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprStarred { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprName { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprList { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprTuple { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprSlice { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprContext { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprContextLoad { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprContextStore { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExprContextDel { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Boolop { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::BoolopAnd { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::BoolopOr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Operator { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorAdd { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorSub { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorMult { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorMatMult { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorDiv { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorMod { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorPow { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorLShift { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorRShift { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorBitOr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorBitXor { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorBitAnd { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::OperatorFloorDiv { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Unaryop { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::UnaryopInvert { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::UnaryopNot { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::UnaryopUAdd { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::UnaryopUSub { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Cmpop { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopEq { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopNotEq { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopLt { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopLtE { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopGt { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopGtE { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopIs { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopIsNot { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopIn { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::CmpopNotIn { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Comprehension { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Excepthandler { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::ExcepthandlerExceptHandler { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Arguments { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Arg { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Keyword { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Alias { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Withitem { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::MatchCase { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::Pattern { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchValue { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchSingleton { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchSequence { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchMapping { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchClass { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchStar { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchAs { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::PatternMatchOr { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::TypeIgnore { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl PyNode for ast::TypeIgnoreTypeIgnore { + #[inline] + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } +} + +impl ToPyAst for ast::ExprContext { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cell = match &self { + ast::ExprContext::Load => ast::ExprContextLoad::py_type_cache(), + ast::ExprContext::Store => ast::ExprContextStore::py_type_cache(), + ast::ExprContext::Del => ast::ExprContextDel::py_type_cache(), + }; + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) + } +} + +impl ToPyAst for ast::Boolop { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cell = match &self { + ast::Boolop::And => ast::BoolopAnd::py_type_cache(), + ast::Boolop::Or => ast::BoolopOr::py_type_cache(), + }; + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) + } +} + +impl ToPyAst for ast::Operator { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cell = match &self { + ast::Operator::Add => ast::OperatorAdd::py_type_cache(), + ast::Operator::Sub => ast::OperatorSub::py_type_cache(), + ast::Operator::Mult => ast::OperatorMult::py_type_cache(), + ast::Operator::MatMult => ast::OperatorMatMult::py_type_cache(), + ast::Operator::Div => ast::OperatorDiv::py_type_cache(), + ast::Operator::Mod => ast::OperatorMod::py_type_cache(), + ast::Operator::Pow => ast::OperatorPow::py_type_cache(), + ast::Operator::LShift => ast::OperatorLShift::py_type_cache(), + ast::Operator::RShift => ast::OperatorRShift::py_type_cache(), + ast::Operator::BitOr => ast::OperatorBitOr::py_type_cache(), + ast::Operator::BitXor => ast::OperatorBitXor::py_type_cache(), + ast::Operator::BitAnd => ast::OperatorBitAnd::py_type_cache(), + ast::Operator::FloorDiv => ast::OperatorFloorDiv::py_type_cache(), + }; + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) + } +} + +impl ToPyAst for ast::Unaryop { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cell = match &self { + ast::Unaryop::Invert => ast::UnaryopInvert::py_type_cache(), + ast::Unaryop::Not => ast::UnaryopNot::py_type_cache(), + ast::Unaryop::UAdd => ast::UnaryopUAdd::py_type_cache(), + ast::Unaryop::USub => ast::UnaryopUSub::py_type_cache(), + }; + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) + } +} + +impl ToPyAst for ast::Cmpop { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cell = match &self { + ast::Cmpop::Eq => ast::CmpopEq::py_type_cache(), + ast::Cmpop::NotEq => ast::CmpopNotEq::py_type_cache(), + ast::Cmpop::Lt => ast::CmpopLt::py_type_cache(), + ast::Cmpop::LtE => ast::CmpopLtE::py_type_cache(), + ast::Cmpop::Gt => ast::CmpopGt::py_type_cache(), + ast::Cmpop::GtE => ast::CmpopGtE::py_type_cache(), + ast::Cmpop::Is => ast::CmpopIs::py_type_cache(), + ast::Cmpop::IsNot => ast::CmpopIsNot::py_type_cache(), + ast::Cmpop::In => ast::CmpopIn::py_type_cache(), + ast::Cmpop::NotIn => ast::CmpopNotIn::py_type_cache(), + }; + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) + } +} + +impl ToPyAst for ast::Mod { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Mod::Module(cons) => cons.to_py_ast(py)?, + ast::Mod::Interactive(cons) => cons.to_py_ast(py)?, + ast::Mod::Expression(cons) => cons.to_py_ast(py)?, + ast::Mod::FunctionType(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ModModule { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + type_ignores, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((body.to_py_ast(py)?, type_ignores.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModInteractive { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((body.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModExpression { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((body.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModFunctionType { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + argtypes, + returns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((argtypes.to_py_ast(py)?, returns.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Stmt { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Stmt::FunctionDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncFunctionDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::ClassDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::Return(cons) => cons.to_py_ast(py)?, + ast::Stmt::Delete(cons) => cons.to_py_ast(py)?, + ast::Stmt::Assign(cons) => cons.to_py_ast(py)?, + ast::Stmt::AugAssign(cons) => cons.to_py_ast(py)?, + ast::Stmt::AnnAssign(cons) => cons.to_py_ast(py)?, + ast::Stmt::For(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncFor(cons) => cons.to_py_ast(py)?, + ast::Stmt::While(cons) => cons.to_py_ast(py)?, + ast::Stmt::If(cons) => cons.to_py_ast(py)?, + ast::Stmt::With(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncWith(cons) => cons.to_py_ast(py)?, + ast::Stmt::Match(cons) => cons.to_py_ast(py)?, + ast::Stmt::Raise(cons) => cons.to_py_ast(py)?, + ast::Stmt::Try(cons) => cons.to_py_ast(py)?, + ast::Stmt::TryStar(cons) => cons.to_py_ast(py)?, + ast::Stmt::Assert(cons) => cons.to_py_ast(py)?, + ast::Stmt::Import(cons) => cons.to_py_ast(py)?, + ast::Stmt::ImportFrom(cons) => cons.to_py_ast(py)?, + ast::Stmt::Global(cons) => cons.to_py_ast(py)?, + ast::Stmt::Nonlocal(cons) => cons.to_py_ast(py)?, + ast::Stmt::Expr(cons) => cons.to_py_ast(py)?, + ast::Stmt::Pass(cons) => cons.to_py_ast(py)?, + ast::Stmt::Break(cons) => cons.to_py_ast(py)?, + ast::Stmt::Continue(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::StmtFunctionDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + args, + body, + decorator_list, + returns, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + args.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + returns.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncFunctionDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + args, + body, + decorator_list, + returns, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + args.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + returns.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtClassDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + bases, + keywords, + body, + decorator_list, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + bases.to_py_ast(py)?, + keywords.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtReturn { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtDelete { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + targets, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((targets.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + targets, + value, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + targets.to_py_ast(py)?, + value.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAugAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + op, + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + op.to_py_ast(py)?, + value.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAnnAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + annotation, + value, + simple, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + annotation.to_py_ast(py)?, + value.to_py_ast(py)?, + simple.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtFor { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + body, + orelse, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncFor { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + body, + orelse, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtWhile { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtIf { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtWith { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + items, + body, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + items.to_py_ast(py)?, + body.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncWith { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + items, + body, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + items.to_py_ast(py)?, + body.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtMatch { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + subject, + cases, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((subject.to_py_ast(py)?, cases.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtRaise { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + exc, + cause, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((exc.to_py_ast(py)?, cause.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtTry { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + handlers, + orelse, + finalbody, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + body.to_py_ast(py)?, + handlers.to_py_ast(py)?, + orelse.to_py_ast(py)?, + finalbody.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtTryStar { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + handlers, + orelse, + finalbody, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + body.to_py_ast(py)?, + handlers.to_py_ast(py)?, + orelse.to_py_ast(py)?, + finalbody.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAssert { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + msg, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((test.to_py_ast(py)?, msg.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtImport { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtImportFrom { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + module, + names, + level, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + module.to_py_ast(py)?, + names.to_py_ast(py)?, + level.map_or_else(|| py.None(), |level| level.to_u32().to_object(py)), + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtGlobal { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtNonlocal { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtExpr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtPass { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtBreak { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtContinue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Expr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Expr::BoolOp(cons) => cons.to_py_ast(py)?, + ast::Expr::NamedExpr(cons) => cons.to_py_ast(py)?, + ast::Expr::BinOp(cons) => cons.to_py_ast(py)?, + ast::Expr::UnaryOp(cons) => cons.to_py_ast(py)?, + ast::Expr::Lambda(cons) => cons.to_py_ast(py)?, + ast::Expr::IfExp(cons) => cons.to_py_ast(py)?, + ast::Expr::Dict(cons) => cons.to_py_ast(py)?, + ast::Expr::Set(cons) => cons.to_py_ast(py)?, + ast::Expr::ListComp(cons) => cons.to_py_ast(py)?, + ast::Expr::SetComp(cons) => cons.to_py_ast(py)?, + ast::Expr::DictComp(cons) => cons.to_py_ast(py)?, + ast::Expr::GeneratorExp(cons) => cons.to_py_ast(py)?, + ast::Expr::Await(cons) => cons.to_py_ast(py)?, + ast::Expr::Yield(cons) => cons.to_py_ast(py)?, + ast::Expr::YieldFrom(cons) => cons.to_py_ast(py)?, + ast::Expr::Compare(cons) => cons.to_py_ast(py)?, + ast::Expr::Call(cons) => cons.to_py_ast(py)?, + ast::Expr::FormattedValue(cons) => cons.to_py_ast(py)?, + ast::Expr::JoinedStr(cons) => cons.to_py_ast(py)?, + ast::Expr::Constant(cons) => cons.to_py_ast(py)?, + ast::Expr::Attribute(cons) => cons.to_py_ast(py)?, + ast::Expr::Subscript(cons) => cons.to_py_ast(py)?, + ast::Expr::Starred(cons) => cons.to_py_ast(py)?, + ast::Expr::Name(cons) => cons.to_py_ast(py)?, + ast::Expr::List(cons) => cons.to_py_ast(py)?, + ast::Expr::Tuple(cons) => cons.to_py_ast(py)?, + ast::Expr::Slice(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ExprBoolOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + op, + values, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((op.to_py_ast(py)?, values.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprNamedExpr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((target.to_py_ast(py)?, value.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprBinOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + left, + op, + right, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + left.to_py_ast(py)?, + op.to_py_ast(py)?, + right.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprUnaryOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + op, + operand, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((op.to_py_ast(py)?, operand.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprLambda { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + args, + body, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((args.to_py_ast(py)?, body.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprIfExp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprDict { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + keys, + values, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((keys.to_py_ast(py)?, values.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSet { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprListComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSetComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprDictComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + key, + value, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + key.to_py_ast(py)?, + value.to_py_ast(py)?, + generators.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprGeneratorExp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprAwait { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprYield { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprYieldFrom { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprCompare { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + left, + ops, + comparators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + left.to_py_ast(py)?, + ops.to_py_ast(py)?, + comparators.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprCall { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + func, + args, + keywords, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + func.to_py_ast(py)?, + args.to_py_ast(py)?, + keywords.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprFormattedValue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + conversion, + format_spec, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + conversion.to_py_ast(py)?, + format_spec.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprJoinedStr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + values, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((values.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprConstant { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + kind, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((constant_to_object(value, py), kind.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprAttribute { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + attr, + ctx, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + attr.to_py_ast(py)?, + ctx.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSubscript { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + slice, + ctx, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + slice.to_py_ast(py)?, + ctx.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprStarred { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprName { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + id, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((id.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprList { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprTuple { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSlice { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + lower, + upper, + step, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + lower.to_py_ast(py)?, + upper.to_py_ast(py)?, + step.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Comprehension { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + ifs, + is_async, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + ifs.to_py_ast(py)?, + is_async.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Excepthandler { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Excepthandler::ExceptHandler(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ExcepthandlerExceptHandler { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + type_, + name, + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + type_.to_py_ast(py)?, + name.to_py_ast(py)?, + body.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Arguments { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + posonlyargs, + args, + vararg, + kwonlyargs, + kw_defaults, + kwarg, + defaults, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + posonlyargs.to_py_ast(py)?, + args.to_py_ast(py)?, + vararg.to_py_ast(py)?, + kwonlyargs.to_py_ast(py)?, + kw_defaults.to_py_ast(py)?, + kwarg.to_py_ast(py)?, + defaults.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Arg { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + arg, + annotation, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + arg.to_py_ast(py)?, + annotation.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Keyword { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + arg, + value, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((arg.to_py_ast(py)?, value.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Alias { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + asname, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((name.to_py_ast(py)?, asname.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Withitem { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + context_expr, + optional_vars, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((context_expr.to_py_ast(py)?, optional_vars.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::MatchCase { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + pattern, + guard, + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + pattern.to_py_ast(py)?, + guard.to_py_ast(py)?, + body.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Pattern { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Pattern::MatchValue(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchSingleton(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchSequence(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchMapping(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchClass(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchStar(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchAs(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchOr(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchValue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchSingleton { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((constant_to_object(value, py),))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchSequence { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((patterns.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchMapping { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + keys, + patterns, + rest, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + keys.to_py_ast(py)?, + patterns.to_py_ast(py)?, + rest.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchClass { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + cls, + patterns, + kwd_attrs, + kwd_patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + cls.to_py_ast(py)?, + patterns.to_py_ast(py)?, + kwd_attrs.to_py_ast(py)?, + kwd_patterns.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchStar { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((name.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchAs { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + pattern, + name, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((pattern.to_py_ast(py)?, name.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchOr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((patterns.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::TypeIgnore { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::TypeIgnore::TypeIgnore(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::TypeIgnoreTypeIgnore { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + lineno, + tag, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((lineno.to_u32().to_object(py), tag.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Mod { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Mod::Module(cons) => cons.to_py_ast(py)?, + ast::Mod::Interactive(cons) => cons.to_py_ast(py)?, + ast::Mod::Expression(cons) => cons.to_py_ast(py)?, + ast::Mod::FunctionType(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ModModule { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + type_ignores, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((body.to_py_ast(py)?, type_ignores.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModInteractive { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((body.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModExpression { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((body.to_py_ast(py)?,))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::ModFunctionType { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + argtypes, + returns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((argtypes.to_py_ast(py)?, returns.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Stmt { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Stmt::FunctionDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncFunctionDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::ClassDef(cons) => cons.to_py_ast(py)?, + ast::Stmt::Return(cons) => cons.to_py_ast(py)?, + ast::Stmt::Delete(cons) => cons.to_py_ast(py)?, + ast::Stmt::Assign(cons) => cons.to_py_ast(py)?, + ast::Stmt::AugAssign(cons) => cons.to_py_ast(py)?, + ast::Stmt::AnnAssign(cons) => cons.to_py_ast(py)?, + ast::Stmt::For(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncFor(cons) => cons.to_py_ast(py)?, + ast::Stmt::While(cons) => cons.to_py_ast(py)?, + ast::Stmt::If(cons) => cons.to_py_ast(py)?, + ast::Stmt::With(cons) => cons.to_py_ast(py)?, + ast::Stmt::AsyncWith(cons) => cons.to_py_ast(py)?, + ast::Stmt::Match(cons) => cons.to_py_ast(py)?, + ast::Stmt::Raise(cons) => cons.to_py_ast(py)?, + ast::Stmt::Try(cons) => cons.to_py_ast(py)?, + ast::Stmt::TryStar(cons) => cons.to_py_ast(py)?, + ast::Stmt::Assert(cons) => cons.to_py_ast(py)?, + ast::Stmt::Import(cons) => cons.to_py_ast(py)?, + ast::Stmt::ImportFrom(cons) => cons.to_py_ast(py)?, + ast::Stmt::Global(cons) => cons.to_py_ast(py)?, + ast::Stmt::Nonlocal(cons) => cons.to_py_ast(py)?, + ast::Stmt::Expr(cons) => cons.to_py_ast(py)?, + ast::Stmt::Pass(cons) => cons.to_py_ast(py)?, + ast::Stmt::Break(cons) => cons.to_py_ast(py)?, + ast::Stmt::Continue(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::StmtFunctionDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + args, + body, + decorator_list, + returns, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + args.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + returns.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncFunctionDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + args, + body, + decorator_list, + returns, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + args.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + returns.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtClassDef { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + bases, + keywords, + body, + decorator_list, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + name.to_py_ast(py)?, + bases.to_py_ast(py)?, + keywords.to_py_ast(py)?, + body.to_py_ast(py)?, + decorator_list.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtReturn { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtDelete { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + targets, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((targets.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + targets, + value, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + targets.to_py_ast(py)?, + value.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAugAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + op, + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + op.to_py_ast(py)?, + value.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAnnAssign { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + annotation, + value, + simple, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + annotation.to_py_ast(py)?, + value.to_py_ast(py)?, + simple.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtFor { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + body, + orelse, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncFor { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + body, + orelse, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtWhile { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtIf { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtWith { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + items, + body, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + items.to_py_ast(py)?, + body.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAsyncWith { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + items, + body, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + items.to_py_ast(py)?, + body.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtMatch { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + subject, + cases, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((subject.to_py_ast(py)?, cases.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtRaise { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + exc, + cause, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((exc.to_py_ast(py)?, cause.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtTry { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + handlers, + orelse, + finalbody, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + body.to_py_ast(py)?, + handlers.to_py_ast(py)?, + orelse.to_py_ast(py)?, + finalbody.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtTryStar { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + body, + handlers, + orelse, + finalbody, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + body.to_py_ast(py)?, + handlers.to_py_ast(py)?, + orelse.to_py_ast(py)?, + finalbody.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtAssert { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + msg, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((test.to_py_ast(py)?, msg.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtImport { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtImportFrom { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + module, + names, + level, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + module.to_py_ast(py)?, + names.to_py_ast(py)?, + level.map_or_else(|| py.None(), |level| level.to_u32().to_object(py)), + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtGlobal { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtNonlocal { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + names, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((names.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtExpr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtPass { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtBreak { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::StmtContinue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { range: _range } = self; + let instance = Py::::as_ref(&cache.0, py).call0()?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Expr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Expr::BoolOp(cons) => cons.to_py_ast(py)?, + ast::Expr::NamedExpr(cons) => cons.to_py_ast(py)?, + ast::Expr::BinOp(cons) => cons.to_py_ast(py)?, + ast::Expr::UnaryOp(cons) => cons.to_py_ast(py)?, + ast::Expr::Lambda(cons) => cons.to_py_ast(py)?, + ast::Expr::IfExp(cons) => cons.to_py_ast(py)?, + ast::Expr::Dict(cons) => cons.to_py_ast(py)?, + ast::Expr::Set(cons) => cons.to_py_ast(py)?, + ast::Expr::ListComp(cons) => cons.to_py_ast(py)?, + ast::Expr::SetComp(cons) => cons.to_py_ast(py)?, + ast::Expr::DictComp(cons) => cons.to_py_ast(py)?, + ast::Expr::GeneratorExp(cons) => cons.to_py_ast(py)?, + ast::Expr::Await(cons) => cons.to_py_ast(py)?, + ast::Expr::Yield(cons) => cons.to_py_ast(py)?, + ast::Expr::YieldFrom(cons) => cons.to_py_ast(py)?, + ast::Expr::Compare(cons) => cons.to_py_ast(py)?, + ast::Expr::Call(cons) => cons.to_py_ast(py)?, + ast::Expr::FormattedValue(cons) => cons.to_py_ast(py)?, + ast::Expr::JoinedStr(cons) => cons.to_py_ast(py)?, + ast::Expr::Constant(cons) => cons.to_py_ast(py)?, + ast::Expr::Attribute(cons) => cons.to_py_ast(py)?, + ast::Expr::Subscript(cons) => cons.to_py_ast(py)?, + ast::Expr::Starred(cons) => cons.to_py_ast(py)?, + ast::Expr::Name(cons) => cons.to_py_ast(py)?, + ast::Expr::List(cons) => cons.to_py_ast(py)?, + ast::Expr::Tuple(cons) => cons.to_py_ast(py)?, + ast::Expr::Slice(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ExprBoolOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + op, + values, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((op.to_py_ast(py)?, values.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprNamedExpr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((target.to_py_ast(py)?, value.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprBinOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + left, + op, + right, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + left.to_py_ast(py)?, + op.to_py_ast(py)?, + right.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprUnaryOp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + op, + operand, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((op.to_py_ast(py)?, operand.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprLambda { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + args, + body, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((args.to_py_ast(py)?, body.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprIfExp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + test, + body, + orelse, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + test.to_py_ast(py)?, + body.to_py_ast(py)?, + orelse.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprDict { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + keys, + values, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((keys.to_py_ast(py)?, values.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSet { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprListComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSetComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprDictComp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + key, + value, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + key.to_py_ast(py)?, + value.to_py_ast(py)?, + generators.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprGeneratorExp { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elt, + generators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((elt.to_py_ast(py)?, generators.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprAwait { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprYield { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprYieldFrom { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprCompare { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + left, + ops, + comparators, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + left.to_py_ast(py)?, + ops.to_py_ast(py)?, + comparators.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprCall { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + func, + args, + keywords, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + func.to_py_ast(py)?, + args.to_py_ast(py)?, + keywords.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprFormattedValue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + conversion, + format_spec, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + conversion.to_py_ast(py)?, + format_spec.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprJoinedStr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + values, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((values.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprConstant { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + kind, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((constant_to_object(value, py), kind.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprAttribute { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + attr, + ctx, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + attr.to_py_ast(py)?, + ctx.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSubscript { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + slice, + ctx, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + value.to_py_ast(py)?, + slice.to_py_ast(py)?, + ctx.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprStarred { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprName { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + id, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((id.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprList { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprTuple { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + elts, + ctx, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((elts.to_py_ast(py)?, ctx.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::ExprSlice { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + lower, + upper, + step, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + lower.to_py_ast(py)?, + upper.to_py_ast(py)?, + step.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Comprehension { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + target, + iter, + ifs, + is_async, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + target.to_py_ast(py)?, + iter.to_py_ast(py)?, + ifs.to_py_ast(py)?, + is_async.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Excepthandler { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Excepthandler::ExceptHandler(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::ExcepthandlerExceptHandler { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + type_, + name, + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + type_.to_py_ast(py)?, + name.to_py_ast(py)?, + body.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Arguments { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + posonlyargs, + args, + vararg, + kwonlyargs, + kw_defaults, + kwarg, + defaults, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + posonlyargs.to_py_ast(py)?, + args.to_py_ast(py)?, + vararg.to_py_ast(py)?, + kwonlyargs.to_py_ast(py)?, + kw_defaults.to_py_ast(py)?, + kwarg.to_py_ast(py)?, + defaults.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Arg { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + arg, + annotation, + type_comment, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + arg.to_py_ast(py)?, + annotation.to_py_ast(py)?, + type_comment.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Keyword { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + arg, + value, + range: _range, + } = self; + + let instance = + Py::::as_ref(&cache.0, py).call1((arg.to_py_ast(py)?, value.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Alias { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + asname, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((name.to_py_ast(py)?, asname.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::Withitem { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + context_expr, + optional_vars, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((context_expr.to_py_ast(py)?, optional_vars.to_py_ast(py)?))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::MatchCase { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + pattern, + guard, + body, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + pattern.to_py_ast(py)?, + guard.to_py_ast(py)?, + body.to_py_ast(py)?, + ))?; + + Ok(instance) + } +} + +impl ToPyAst for ast::Pattern { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::Pattern::MatchValue(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchSingleton(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchSequence(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchMapping(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchClass(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchStar(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchAs(cons) => cons.to_py_ast(py)?, + ast::Pattern::MatchOr(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchValue { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((value.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchSingleton { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + value, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((constant_to_object(value, py),))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchSequence { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((patterns.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchMapping { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + keys, + patterns, + rest, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + keys.to_py_ast(py)?, + patterns.to_py_ast(py)?, + rest.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchClass { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + cls, + patterns, + kwd_attrs, + kwd_patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1(( + cls.to_py_ast(py)?, + patterns.to_py_ast(py)?, + kwd_attrs.to_py_ast(py)?, + kwd_patterns.to_py_ast(py)?, + ))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchStar { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + name, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((name.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchAs { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + pattern, + name, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((pattern.to_py_ast(py)?, name.to_py_ast(py)?))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::PatternMatchOr { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + patterns, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py).call1((patterns.to_py_ast(py)?,))?; + + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; + if let Some(end) = _range.end { + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; + } + + Ok(instance) + } +} + +impl ToPyAst for ast::TypeIgnore { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let instance = match &self { + ast::TypeIgnore::TypeIgnore(cons) => cons.to_py_ast(py)?, + }; + Ok(instance) + } +} + +impl ToPyAst for ast::TypeIgnoreTypeIgnore { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let cache = Self::py_type_cache().get().unwrap(); + + let Self { + lineno, + tag, + range: _range, + } = self; + + let instance = Py::::as_ref(&cache.0, py) + .call1((lineno.to_u32().to_object(py), tag.to_py_ast(py)?))?; + + Ok(instance) + } +} + +fn init_types(py: Python) -> PyResult<()> { + let ast_module = PyModule::import(py, "_ast")?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + cache_py_type::(ast_module)?; + Ok(()) +} diff --git a/ast/src/gen/pyo3_wrapper_located.rs b/ast-pyo3/src/gen/wrapper_located.rs similarity index 54% rename from ast/src/gen/pyo3_wrapper_located.rs rename to ast-pyo3/src/gen/wrapper_located.rs index ba55ee2..1f4e0d6 100644 --- a/ast/src/gen/pyo3_wrapper_located.rs +++ b/ast-pyo3/src/gen/wrapper_located.rs @@ -1,11 +1,11 @@ // File automatically generated by ast/asdl_rs.py. -#[pyclass(module="rustpython_ast.located", name="_mod", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_mod", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Mod; -impl From<&'static crate::Mod> for Mod { - fn from(_node: &'static crate::Mod) -> Self { +impl From<&'static ast::Mod> for Mod { + fn from(_node: &'static ast::Mod) -> Self { Mod } } @@ -14,7 +14,7 @@ impl From<&'static crate::Mod> for Mod { impl Mod { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Mod { @@ -24,40 +24,40 @@ impl ToPyObject for Mod { } } -impl ToPyo3Wrapper for crate::Mod { +impl ToPyWrapper for ast::Mod { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::Module(cons) => cons.to_pyo3_wrapper(py), - Self::Interactive(cons) => cons.to_pyo3_wrapper(py), - Self::Expression(cons) => cons.to_pyo3_wrapper(py), - Self::FunctionType(cons) => cons.to_pyo3_wrapper(py), + Self::Module(cons) => cons.to_py_wrapper(py), + Self::Interactive(cons) => cons.to_py_wrapper(py), + Self::Expression(cons) => cons.to_py_wrapper(py), + Self::FunctionType(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_Module", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModModule(pub &'static crate::ModModule); +pub struct ModModule(pub &'static ast::ModModule); -impl From<&'static crate::ModModule> for ModModule { - fn from(node: &'static crate::ModModule) -> Self { +impl From<&'static ast::ModModule> for ModModule { + fn from(node: &'static ast::ModModule) -> Self { ModModule(node) } } impl ToPyObject for ModModule { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModModule { +impl ToPyWrapper for ast::ModModule { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModModule(self).to_object(py)) } } @@ -67,38 +67,38 @@ impl ModModule { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_ignores(&self, py: Python) -> PyResult { - self.0.type_ignores.to_pyo3_wrapper(py) + self.0.type_ignores.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Interactive", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModInteractive(pub &'static crate::ModInteractive); +pub struct ModInteractive(pub &'static ast::ModInteractive); -impl From<&'static crate::ModInteractive> for ModInteractive { - fn from(node: &'static crate::ModInteractive) -> Self { +impl From<&'static ast::ModInteractive> for ModInteractive { + fn from(node: &'static ast::ModInteractive) -> Self { ModInteractive(node) } } impl ToPyObject for ModInteractive { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModInteractive { +impl ToPyWrapper for ast::ModInteractive { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModInteractive(self).to_object(py)) } } @@ -108,32 +108,32 @@ impl ModInteractive { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Expression", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModExpression(pub &'static crate::ModExpression); +pub struct ModExpression(pub &'static ast::ModExpression); -impl From<&'static crate::ModExpression> for ModExpression { - fn from(node: &'static crate::ModExpression) -> Self { +impl From<&'static ast::ModExpression> for ModExpression { + fn from(node: &'static ast::ModExpression) -> Self { ModExpression(node) } } impl ToPyObject for ModExpression { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModExpression { +impl ToPyWrapper for ast::ModExpression { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModExpression(self).to_object(py)) } } @@ -143,32 +143,32 @@ impl ModExpression { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_FunctionType", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModFunctionType(pub &'static crate::ModFunctionType); +pub struct ModFunctionType(pub &'static ast::ModFunctionType); -impl From<&'static crate::ModFunctionType> for ModFunctionType { - fn from(node: &'static crate::ModFunctionType) -> Self { +impl From<&'static ast::ModFunctionType> for ModFunctionType { + fn from(node: &'static ast::ModFunctionType) -> Self { ModFunctionType(node) } } impl ToPyObject for ModFunctionType { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModFunctionType { +impl ToPyWrapper for ast::ModFunctionType { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModFunctionType(self).to_object(py)) } } @@ -178,22 +178,22 @@ impl ModFunctionType { #[getter] #[inline] fn get_argtypes(&self, py: Python) -> PyResult { - self.0.argtypes.to_pyo3_wrapper(py) + self.0.argtypes.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_stmt", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_stmt", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Stmt; -impl From<&'static crate::Stmt> for Stmt { - fn from(_node: &'static crate::Stmt) -> Self { +impl From<&'static ast::Stmt> for Stmt { + fn from(_node: &'static ast::Stmt) -> Self { Stmt } } @@ -202,7 +202,7 @@ impl From<&'static crate::Stmt> for Stmt { impl Stmt { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Stmt { @@ -212,63 +212,63 @@ impl ToPyObject for Stmt { } } -impl ToPyo3Wrapper for crate::Stmt { +impl ToPyWrapper for ast::Stmt { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::FunctionDef(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncFunctionDef(cons) => cons.to_pyo3_wrapper(py), - Self::ClassDef(cons) => cons.to_pyo3_wrapper(py), - Self::Return(cons) => cons.to_pyo3_wrapper(py), - Self::Delete(cons) => cons.to_pyo3_wrapper(py), - Self::Assign(cons) => cons.to_pyo3_wrapper(py), - Self::AugAssign(cons) => cons.to_pyo3_wrapper(py), - Self::AnnAssign(cons) => cons.to_pyo3_wrapper(py), - Self::For(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncFor(cons) => cons.to_pyo3_wrapper(py), - Self::While(cons) => cons.to_pyo3_wrapper(py), - Self::If(cons) => cons.to_pyo3_wrapper(py), - Self::With(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncWith(cons) => cons.to_pyo3_wrapper(py), - Self::Match(cons) => cons.to_pyo3_wrapper(py), - Self::Raise(cons) => cons.to_pyo3_wrapper(py), - Self::Try(cons) => cons.to_pyo3_wrapper(py), - Self::TryStar(cons) => cons.to_pyo3_wrapper(py), - Self::Assert(cons) => cons.to_pyo3_wrapper(py), - Self::Import(cons) => cons.to_pyo3_wrapper(py), - Self::ImportFrom(cons) => cons.to_pyo3_wrapper(py), - Self::Global(cons) => cons.to_pyo3_wrapper(py), - Self::Nonlocal(cons) => cons.to_pyo3_wrapper(py), - Self::Expr(cons) => cons.to_pyo3_wrapper(py), - Self::Pass(cons) => cons.to_pyo3_wrapper(py), - Self::Break(cons) => cons.to_pyo3_wrapper(py), - Self::Continue(cons) => cons.to_pyo3_wrapper(py), + Self::FunctionDef(cons) => cons.to_py_wrapper(py), + Self::AsyncFunctionDef(cons) => cons.to_py_wrapper(py), + Self::ClassDef(cons) => cons.to_py_wrapper(py), + Self::Return(cons) => cons.to_py_wrapper(py), + Self::Delete(cons) => cons.to_py_wrapper(py), + Self::Assign(cons) => cons.to_py_wrapper(py), + Self::AugAssign(cons) => cons.to_py_wrapper(py), + Self::AnnAssign(cons) => cons.to_py_wrapper(py), + Self::For(cons) => cons.to_py_wrapper(py), + Self::AsyncFor(cons) => cons.to_py_wrapper(py), + Self::While(cons) => cons.to_py_wrapper(py), + Self::If(cons) => cons.to_py_wrapper(py), + Self::With(cons) => cons.to_py_wrapper(py), + Self::AsyncWith(cons) => cons.to_py_wrapper(py), + Self::Match(cons) => cons.to_py_wrapper(py), + Self::Raise(cons) => cons.to_py_wrapper(py), + Self::Try(cons) => cons.to_py_wrapper(py), + Self::TryStar(cons) => cons.to_py_wrapper(py), + Self::Assert(cons) => cons.to_py_wrapper(py), + Self::Import(cons) => cons.to_py_wrapper(py), + Self::ImportFrom(cons) => cons.to_py_wrapper(py), + Self::Global(cons) => cons.to_py_wrapper(py), + Self::Nonlocal(cons) => cons.to_py_wrapper(py), + Self::Expr(cons) => cons.to_py_wrapper(py), + Self::Pass(cons) => cons.to_py_wrapper(py), + Self::Break(cons) => cons.to_py_wrapper(py), + Self::Continue(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_FunctionDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtFunctionDef(pub &'static crate::StmtFunctionDef); +pub struct StmtFunctionDef(pub &'static ast::StmtFunctionDef); -impl From<&'static crate::StmtFunctionDef> for StmtFunctionDef { - fn from(node: &'static crate::StmtFunctionDef) -> Self { +impl From<&'static ast::StmtFunctionDef> for StmtFunctionDef { + fn from(node: &'static ast::StmtFunctionDef) -> Self { StmtFunctionDef(node) } } impl ToPyObject for StmtFunctionDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtFunctionDef { +impl ToPyWrapper for ast::StmtFunctionDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtFunctionDef(self).to_object(py)) } } @@ -278,62 +278,62 @@ impl StmtFunctionDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_AsyncFunctionDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncFunctionDef(pub &'static crate::StmtAsyncFunctionDef); +pub struct StmtAsyncFunctionDef(pub &'static ast::StmtAsyncFunctionDef); -impl From<&'static crate::StmtAsyncFunctionDef> for StmtAsyncFunctionDef { - fn from(node: &'static crate::StmtAsyncFunctionDef) -> Self { +impl From<&'static ast::StmtAsyncFunctionDef> for StmtAsyncFunctionDef { + fn from(node: &'static ast::StmtAsyncFunctionDef) -> Self { StmtAsyncFunctionDef(node) } } impl ToPyObject for StmtAsyncFunctionDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncFunctionDef { +impl ToPyWrapper for ast::StmtAsyncFunctionDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncFunctionDef(self).to_object(py)) } } @@ -343,62 +343,62 @@ impl StmtAsyncFunctionDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_ClassDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtClassDef(pub &'static crate::StmtClassDef); +pub struct StmtClassDef(pub &'static ast::StmtClassDef); -impl From<&'static crate::StmtClassDef> for StmtClassDef { - fn from(node: &'static crate::StmtClassDef) -> Self { +impl From<&'static ast::StmtClassDef> for StmtClassDef { + fn from(node: &'static ast::StmtClassDef) -> Self { StmtClassDef(node) } } impl ToPyObject for StmtClassDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtClassDef { +impl ToPyWrapper for ast::StmtClassDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtClassDef(self).to_object(py)) } } @@ -408,56 +408,56 @@ impl StmtClassDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_bases(&self, py: Python) -> PyResult { - self.0.bases.to_pyo3_wrapper(py) + self.0.bases.to_py_wrapper(py) } #[getter] #[inline] fn get_keywords(&self, py: Python) -> PyResult { - self.0.keywords.to_pyo3_wrapper(py) + self.0.keywords.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Return", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtReturn(pub &'static crate::StmtReturn); +pub struct StmtReturn(pub &'static ast::StmtReturn); -impl From<&'static crate::StmtReturn> for StmtReturn { - fn from(node: &'static crate::StmtReturn) -> Self { +impl From<&'static ast::StmtReturn> for StmtReturn { + fn from(node: &'static ast::StmtReturn) -> Self { StmtReturn(node) } } impl ToPyObject for StmtReturn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtReturn { +impl ToPyWrapper for ast::StmtReturn { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtReturn(self).to_object(py)) } } @@ -467,32 +467,32 @@ impl StmtReturn { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Delete", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtDelete(pub &'static crate::StmtDelete); +pub struct StmtDelete(pub &'static ast::StmtDelete); -impl From<&'static crate::StmtDelete> for StmtDelete { - fn from(node: &'static crate::StmtDelete) -> Self { +impl From<&'static ast::StmtDelete> for StmtDelete { + fn from(node: &'static ast::StmtDelete) -> Self { StmtDelete(node) } } impl ToPyObject for StmtDelete { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtDelete { +impl ToPyWrapper for ast::StmtDelete { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtDelete(self).to_object(py)) } } @@ -502,32 +502,32 @@ impl StmtDelete { #[getter] #[inline] fn get_targets(&self, py: Python) -> PyResult { - self.0.targets.to_pyo3_wrapper(py) + self.0.targets.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Assign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAssign(pub &'static crate::StmtAssign); +pub struct StmtAssign(pub &'static ast::StmtAssign); -impl From<&'static crate::StmtAssign> for StmtAssign { - fn from(node: &'static crate::StmtAssign) -> Self { +impl From<&'static ast::StmtAssign> for StmtAssign { + fn from(node: &'static ast::StmtAssign) -> Self { StmtAssign(node) } } impl ToPyObject for StmtAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAssign { +impl ToPyWrapper for ast::StmtAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAssign(self).to_object(py)) } } @@ -537,44 +537,44 @@ impl StmtAssign { #[getter] #[inline] fn get_targets(&self, py: Python) -> PyResult { - self.0.targets.to_pyo3_wrapper(py) + self.0.targets.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_AugAssign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAugAssign(pub &'static crate::StmtAugAssign); +pub struct StmtAugAssign(pub &'static ast::StmtAugAssign); -impl From<&'static crate::StmtAugAssign> for StmtAugAssign { - fn from(node: &'static crate::StmtAugAssign) -> Self { +impl From<&'static ast::StmtAugAssign> for StmtAugAssign { + fn from(node: &'static ast::StmtAugAssign) -> Self { StmtAugAssign(node) } } impl ToPyObject for StmtAugAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAugAssign { +impl ToPyWrapper for ast::StmtAugAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAugAssign(self).to_object(py)) } } @@ -584,44 +584,44 @@ impl StmtAugAssign { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_AnnAssign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAnnAssign(pub &'static crate::StmtAnnAssign); +pub struct StmtAnnAssign(pub &'static ast::StmtAnnAssign); -impl From<&'static crate::StmtAnnAssign> for StmtAnnAssign { - fn from(node: &'static crate::StmtAnnAssign) -> Self { +impl From<&'static ast::StmtAnnAssign> for StmtAnnAssign { + fn from(node: &'static ast::StmtAnnAssign) -> Self { StmtAnnAssign(node) } } impl ToPyObject for StmtAnnAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAnnAssign { +impl ToPyWrapper for ast::StmtAnnAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAnnAssign(self).to_object(py)) } } @@ -631,50 +631,50 @@ impl StmtAnnAssign { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_annotation(&self, py: Python) -> PyResult { - self.0.annotation.to_pyo3_wrapper(py) + self.0.annotation.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_simple(&self, py: Python) -> PyResult { - self.0.simple.to_pyo3_wrapper(py) + self.0.simple.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_For", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtFor(pub &'static crate::StmtFor); +pub struct StmtFor(pub &'static ast::StmtFor); -impl From<&'static crate::StmtFor> for StmtFor { - fn from(node: &'static crate::StmtFor) -> Self { +impl From<&'static ast::StmtFor> for StmtFor { + fn from(node: &'static ast::StmtFor) -> Self { StmtFor(node) } } impl ToPyObject for StmtFor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtFor { +impl ToPyWrapper for ast::StmtFor { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtFor(self).to_object(py)) } } @@ -684,56 +684,56 @@ impl StmtFor { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_AsyncFor", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncFor(pub &'static crate::StmtAsyncFor); +pub struct StmtAsyncFor(pub &'static ast::StmtAsyncFor); -impl From<&'static crate::StmtAsyncFor> for StmtAsyncFor { - fn from(node: &'static crate::StmtAsyncFor) -> Self { +impl From<&'static ast::StmtAsyncFor> for StmtAsyncFor { + fn from(node: &'static ast::StmtAsyncFor) -> Self { StmtAsyncFor(node) } } impl ToPyObject for StmtAsyncFor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncFor { +impl ToPyWrapper for ast::StmtAsyncFor { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncFor(self).to_object(py)) } } @@ -743,56 +743,56 @@ impl StmtAsyncFor { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_While", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtWhile(pub &'static crate::StmtWhile); +pub struct StmtWhile(pub &'static ast::StmtWhile); -impl From<&'static crate::StmtWhile> for StmtWhile { - fn from(node: &'static crate::StmtWhile) -> Self { +impl From<&'static ast::StmtWhile> for StmtWhile { + fn from(node: &'static ast::StmtWhile) -> Self { StmtWhile(node) } } impl ToPyObject for StmtWhile { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtWhile { +impl ToPyWrapper for ast::StmtWhile { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtWhile(self).to_object(py)) } } @@ -802,44 +802,44 @@ impl StmtWhile { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_If", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtIf(pub &'static crate::StmtIf); +pub struct StmtIf(pub &'static ast::StmtIf); -impl From<&'static crate::StmtIf> for StmtIf { - fn from(node: &'static crate::StmtIf) -> Self { +impl From<&'static ast::StmtIf> for StmtIf { + fn from(node: &'static ast::StmtIf) -> Self { StmtIf(node) } } impl ToPyObject for StmtIf { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtIf { +impl ToPyWrapper for ast::StmtIf { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtIf(self).to_object(py)) } } @@ -849,44 +849,44 @@ impl StmtIf { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_With", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtWith(pub &'static crate::StmtWith); +pub struct StmtWith(pub &'static ast::StmtWith); -impl From<&'static crate::StmtWith> for StmtWith { - fn from(node: &'static crate::StmtWith) -> Self { +impl From<&'static ast::StmtWith> for StmtWith { + fn from(node: &'static ast::StmtWith) -> Self { StmtWith(node) } } impl ToPyObject for StmtWith { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtWith { +impl ToPyWrapper for ast::StmtWith { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtWith(self).to_object(py)) } } @@ -896,44 +896,44 @@ impl StmtWith { #[getter] #[inline] fn get_items(&self, py: Python) -> PyResult { - self.0.items.to_pyo3_wrapper(py) + self.0.items.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_AsyncWith", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncWith(pub &'static crate::StmtAsyncWith); +pub struct StmtAsyncWith(pub &'static ast::StmtAsyncWith); -impl From<&'static crate::StmtAsyncWith> for StmtAsyncWith { - fn from(node: &'static crate::StmtAsyncWith) -> Self { +impl From<&'static ast::StmtAsyncWith> for StmtAsyncWith { + fn from(node: &'static ast::StmtAsyncWith) -> Self { StmtAsyncWith(node) } } impl ToPyObject for StmtAsyncWith { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncWith { +impl ToPyWrapper for ast::StmtAsyncWith { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncWith(self).to_object(py)) } } @@ -943,44 +943,44 @@ impl StmtAsyncWith { #[getter] #[inline] fn get_items(&self, py: Python) -> PyResult { - self.0.items.to_pyo3_wrapper(py) + self.0.items.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Match", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtMatch(pub &'static crate::StmtMatch); +pub struct StmtMatch(pub &'static ast::StmtMatch); -impl From<&'static crate::StmtMatch> for StmtMatch { - fn from(node: &'static crate::StmtMatch) -> Self { +impl From<&'static ast::StmtMatch> for StmtMatch { + fn from(node: &'static ast::StmtMatch) -> Self { StmtMatch(node) } } impl ToPyObject for StmtMatch { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtMatch { +impl ToPyWrapper for ast::StmtMatch { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtMatch(self).to_object(py)) } } @@ -990,38 +990,38 @@ impl StmtMatch { #[getter] #[inline] fn get_subject(&self, py: Python) -> PyResult { - self.0.subject.to_pyo3_wrapper(py) + self.0.subject.to_py_wrapper(py) } #[getter] #[inline] fn get_cases(&self, py: Python) -> PyResult { - self.0.cases.to_pyo3_wrapper(py) + self.0.cases.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Raise", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtRaise(pub &'static crate::StmtRaise); +pub struct StmtRaise(pub &'static ast::StmtRaise); -impl From<&'static crate::StmtRaise> for StmtRaise { - fn from(node: &'static crate::StmtRaise) -> Self { +impl From<&'static ast::StmtRaise> for StmtRaise { + fn from(node: &'static ast::StmtRaise) -> Self { StmtRaise(node) } } impl ToPyObject for StmtRaise { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtRaise { +impl ToPyWrapper for ast::StmtRaise { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtRaise(self).to_object(py)) } } @@ -1031,38 +1031,38 @@ impl StmtRaise { #[getter] #[inline] fn get_exc(&self, py: Python) -> PyResult { - self.0.exc.to_pyo3_wrapper(py) + self.0.exc.to_py_wrapper(py) } #[getter] #[inline] fn get_cause(&self, py: Python) -> PyResult { - self.0.cause.to_pyo3_wrapper(py) + self.0.cause.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Try", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtTry(pub &'static crate::StmtTry); +pub struct StmtTry(pub &'static ast::StmtTry); -impl From<&'static crate::StmtTry> for StmtTry { - fn from(node: &'static crate::StmtTry) -> Self { +impl From<&'static ast::StmtTry> for StmtTry { + fn from(node: &'static ast::StmtTry) -> Self { StmtTry(node) } } impl ToPyObject for StmtTry { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtTry { +impl ToPyWrapper for ast::StmtTry { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtTry(self).to_object(py)) } } @@ -1072,50 +1072,50 @@ impl StmtTry { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_handlers(&self, py: Python) -> PyResult { - self.0.handlers.to_pyo3_wrapper(py) + self.0.handlers.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_finalbody(&self, py: Python) -> PyResult { - self.0.finalbody.to_pyo3_wrapper(py) + self.0.finalbody.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_TryStar", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtTryStar(pub &'static crate::StmtTryStar); +pub struct StmtTryStar(pub &'static ast::StmtTryStar); -impl From<&'static crate::StmtTryStar> for StmtTryStar { - fn from(node: &'static crate::StmtTryStar) -> Self { +impl From<&'static ast::StmtTryStar> for StmtTryStar { + fn from(node: &'static ast::StmtTryStar) -> Self { StmtTryStar(node) } } impl ToPyObject for StmtTryStar { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtTryStar { +impl ToPyWrapper for ast::StmtTryStar { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtTryStar(self).to_object(py)) } } @@ -1125,50 +1125,50 @@ impl StmtTryStar { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_handlers(&self, py: Python) -> PyResult { - self.0.handlers.to_pyo3_wrapper(py) + self.0.handlers.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_finalbody(&self, py: Python) -> PyResult { - self.0.finalbody.to_pyo3_wrapper(py) + self.0.finalbody.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Assert", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAssert(pub &'static crate::StmtAssert); +pub struct StmtAssert(pub &'static ast::StmtAssert); -impl From<&'static crate::StmtAssert> for StmtAssert { - fn from(node: &'static crate::StmtAssert) -> Self { +impl From<&'static ast::StmtAssert> for StmtAssert { + fn from(node: &'static ast::StmtAssert) -> Self { StmtAssert(node) } } impl ToPyObject for StmtAssert { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAssert { +impl ToPyWrapper for ast::StmtAssert { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAssert(self).to_object(py)) } } @@ -1178,38 +1178,38 @@ impl StmtAssert { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_msg(&self, py: Python) -> PyResult { - self.0.msg.to_pyo3_wrapper(py) + self.0.msg.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Import", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtImport(pub &'static crate::StmtImport); +pub struct StmtImport(pub &'static ast::StmtImport); -impl From<&'static crate::StmtImport> for StmtImport { - fn from(node: &'static crate::StmtImport) -> Self { +impl From<&'static ast::StmtImport> for StmtImport { + fn from(node: &'static ast::StmtImport) -> Self { StmtImport(node) } } impl ToPyObject for StmtImport { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtImport { +impl ToPyWrapper for ast::StmtImport { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtImport(self).to_object(py)) } } @@ -1219,32 +1219,32 @@ impl StmtImport { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_ImportFrom", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtImportFrom(pub &'static crate::StmtImportFrom); +pub struct StmtImportFrom(pub &'static ast::StmtImportFrom); -impl From<&'static crate::StmtImportFrom> for StmtImportFrom { - fn from(node: &'static crate::StmtImportFrom) -> Self { +impl From<&'static ast::StmtImportFrom> for StmtImportFrom { + fn from(node: &'static ast::StmtImportFrom) -> Self { StmtImportFrom(node) } } impl ToPyObject for StmtImportFrom { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtImportFrom { +impl ToPyWrapper for ast::StmtImportFrom { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtImportFrom(self).to_object(py)) } } @@ -1254,44 +1254,44 @@ impl StmtImportFrom { #[getter] #[inline] fn get_module(&self, py: Python) -> PyResult { - self.0.module.to_pyo3_wrapper(py) + self.0.module.to_py_wrapper(py) } #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } #[getter] #[inline] fn get_level(&self, py: Python) -> PyResult { - self.0.level.to_pyo3_wrapper(py) + self.0.level.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Global", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtGlobal(pub &'static crate::StmtGlobal); +pub struct StmtGlobal(pub &'static ast::StmtGlobal); -impl From<&'static crate::StmtGlobal> for StmtGlobal { - fn from(node: &'static crate::StmtGlobal) -> Self { +impl From<&'static ast::StmtGlobal> for StmtGlobal { + fn from(node: &'static ast::StmtGlobal) -> Self { StmtGlobal(node) } } impl ToPyObject for StmtGlobal { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtGlobal { +impl ToPyWrapper for ast::StmtGlobal { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtGlobal(self).to_object(py)) } } @@ -1301,32 +1301,32 @@ impl StmtGlobal { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Nonlocal", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtNonlocal(pub &'static crate::StmtNonlocal); +pub struct StmtNonlocal(pub &'static ast::StmtNonlocal); -impl From<&'static crate::StmtNonlocal> for StmtNonlocal { - fn from(node: &'static crate::StmtNonlocal) -> Self { +impl From<&'static ast::StmtNonlocal> for StmtNonlocal { + fn from(node: &'static ast::StmtNonlocal) -> Self { StmtNonlocal(node) } } impl ToPyObject for StmtNonlocal { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtNonlocal { +impl ToPyWrapper for ast::StmtNonlocal { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtNonlocal(self).to_object(py)) } } @@ -1336,32 +1336,32 @@ impl StmtNonlocal { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Expr", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtExpr(pub &'static crate::StmtExpr); +pub struct StmtExpr(pub &'static ast::StmtExpr); -impl From<&'static crate::StmtExpr> for StmtExpr { - fn from(node: &'static crate::StmtExpr) -> Self { +impl From<&'static ast::StmtExpr> for StmtExpr { + fn from(node: &'static ast::StmtExpr) -> Self { StmtExpr(node) } } impl ToPyObject for StmtExpr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtExpr { +impl ToPyWrapper for ast::StmtExpr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtExpr(self).to_object(py)) } } @@ -1371,32 +1371,32 @@ impl StmtExpr { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Pass", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtPass(pub &'static crate::StmtPass); +pub struct StmtPass(pub &'static ast::StmtPass); -impl From<&'static crate::StmtPass> for StmtPass { - fn from(node: &'static crate::StmtPass) -> Self { +impl From<&'static ast::StmtPass> for StmtPass { + fn from(node: &'static ast::StmtPass) -> Self { StmtPass(node) } } impl ToPyObject for StmtPass { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtPass { +impl ToPyWrapper for ast::StmtPass { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtPass(self).to_object(py)) } } @@ -1406,26 +1406,26 @@ impl StmtPass {} #[pyclass(module="rustpython_ast.located", name="_Break", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtBreak(pub &'static crate::StmtBreak); +pub struct StmtBreak(pub &'static ast::StmtBreak); -impl From<&'static crate::StmtBreak> for StmtBreak { - fn from(node: &'static crate::StmtBreak) -> Self { +impl From<&'static ast::StmtBreak> for StmtBreak { + fn from(node: &'static ast::StmtBreak) -> Self { StmtBreak(node) } } impl ToPyObject for StmtBreak { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtBreak { +impl ToPyWrapper for ast::StmtBreak { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtBreak(self).to_object(py)) } } @@ -1435,26 +1435,26 @@ impl StmtBreak {} #[pyclass(module="rustpython_ast.located", name="_Continue", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtContinue(pub &'static crate::StmtContinue); +pub struct StmtContinue(pub &'static ast::StmtContinue); -impl From<&'static crate::StmtContinue> for StmtContinue { - fn from(node: &'static crate::StmtContinue) -> Self { +impl From<&'static ast::StmtContinue> for StmtContinue { + fn from(node: &'static ast::StmtContinue) -> Self { StmtContinue(node) } } impl ToPyObject for StmtContinue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtContinue { +impl ToPyWrapper for ast::StmtContinue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtContinue(self).to_object(py)) } } @@ -1462,12 +1462,12 @@ impl ToPyo3Wrapper for crate::StmtContinue { #[pymethods] impl StmtContinue {} -#[pyclass(module="rustpython_ast.located", name="_expr", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_expr", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Expr; -impl From<&'static crate::Expr> for Expr { - fn from(_node: &'static crate::Expr) -> Self { +impl From<&'static ast::Expr> for Expr { + fn from(_node: &'static ast::Expr) -> Self { Expr } } @@ -1476,7 +1476,7 @@ impl From<&'static crate::Expr> for Expr { impl Expr { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Expr { @@ -1486,63 +1486,63 @@ impl ToPyObject for Expr { } } -impl ToPyo3Wrapper for crate::Expr { +impl ToPyWrapper for ast::Expr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::BoolOp(cons) => cons.to_pyo3_wrapper(py), - Self::NamedExpr(cons) => cons.to_pyo3_wrapper(py), - Self::BinOp(cons) => cons.to_pyo3_wrapper(py), - Self::UnaryOp(cons) => cons.to_pyo3_wrapper(py), - Self::Lambda(cons) => cons.to_pyo3_wrapper(py), - Self::IfExp(cons) => cons.to_pyo3_wrapper(py), - Self::Dict(cons) => cons.to_pyo3_wrapper(py), - Self::Set(cons) => cons.to_pyo3_wrapper(py), - Self::ListComp(cons) => cons.to_pyo3_wrapper(py), - Self::SetComp(cons) => cons.to_pyo3_wrapper(py), - Self::DictComp(cons) => cons.to_pyo3_wrapper(py), - Self::GeneratorExp(cons) => cons.to_pyo3_wrapper(py), - Self::Await(cons) => cons.to_pyo3_wrapper(py), - Self::Yield(cons) => cons.to_pyo3_wrapper(py), - Self::YieldFrom(cons) => cons.to_pyo3_wrapper(py), - Self::Compare(cons) => cons.to_pyo3_wrapper(py), - Self::Call(cons) => cons.to_pyo3_wrapper(py), - Self::FormattedValue(cons) => cons.to_pyo3_wrapper(py), - Self::JoinedStr(cons) => cons.to_pyo3_wrapper(py), - Self::Constant(cons) => cons.to_pyo3_wrapper(py), - Self::Attribute(cons) => cons.to_pyo3_wrapper(py), - Self::Subscript(cons) => cons.to_pyo3_wrapper(py), - Self::Starred(cons) => cons.to_pyo3_wrapper(py), - Self::Name(cons) => cons.to_pyo3_wrapper(py), - Self::List(cons) => cons.to_pyo3_wrapper(py), - Self::Tuple(cons) => cons.to_pyo3_wrapper(py), - Self::Slice(cons) => cons.to_pyo3_wrapper(py), + Self::BoolOp(cons) => cons.to_py_wrapper(py), + Self::NamedExpr(cons) => cons.to_py_wrapper(py), + Self::BinOp(cons) => cons.to_py_wrapper(py), + Self::UnaryOp(cons) => cons.to_py_wrapper(py), + Self::Lambda(cons) => cons.to_py_wrapper(py), + Self::IfExp(cons) => cons.to_py_wrapper(py), + Self::Dict(cons) => cons.to_py_wrapper(py), + Self::Set(cons) => cons.to_py_wrapper(py), + Self::ListComp(cons) => cons.to_py_wrapper(py), + Self::SetComp(cons) => cons.to_py_wrapper(py), + Self::DictComp(cons) => cons.to_py_wrapper(py), + Self::GeneratorExp(cons) => cons.to_py_wrapper(py), + Self::Await(cons) => cons.to_py_wrapper(py), + Self::Yield(cons) => cons.to_py_wrapper(py), + Self::YieldFrom(cons) => cons.to_py_wrapper(py), + Self::Compare(cons) => cons.to_py_wrapper(py), + Self::Call(cons) => cons.to_py_wrapper(py), + Self::FormattedValue(cons) => cons.to_py_wrapper(py), + Self::JoinedStr(cons) => cons.to_py_wrapper(py), + Self::Constant(cons) => cons.to_py_wrapper(py), + Self::Attribute(cons) => cons.to_py_wrapper(py), + Self::Subscript(cons) => cons.to_py_wrapper(py), + Self::Starred(cons) => cons.to_py_wrapper(py), + Self::Name(cons) => cons.to_py_wrapper(py), + Self::List(cons) => cons.to_py_wrapper(py), + Self::Tuple(cons) => cons.to_py_wrapper(py), + Self::Slice(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_BoolOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprBoolOp(pub &'static crate::ExprBoolOp); +pub struct ExprBoolOp(pub &'static ast::ExprBoolOp); -impl From<&'static crate::ExprBoolOp> for ExprBoolOp { - fn from(node: &'static crate::ExprBoolOp) -> Self { +impl From<&'static ast::ExprBoolOp> for ExprBoolOp { + fn from(node: &'static ast::ExprBoolOp) -> Self { ExprBoolOp(node) } } impl ToPyObject for ExprBoolOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprBoolOp { +impl ToPyWrapper for ast::ExprBoolOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprBoolOp(self).to_object(py)) } } @@ -1552,38 +1552,38 @@ impl ExprBoolOp { #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_NamedExpr", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprNamedExpr(pub &'static crate::ExprNamedExpr); +pub struct ExprNamedExpr(pub &'static ast::ExprNamedExpr); -impl From<&'static crate::ExprNamedExpr> for ExprNamedExpr { - fn from(node: &'static crate::ExprNamedExpr) -> Self { +impl From<&'static ast::ExprNamedExpr> for ExprNamedExpr { + fn from(node: &'static ast::ExprNamedExpr) -> Self { ExprNamedExpr(node) } } impl ToPyObject for ExprNamedExpr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprNamedExpr { +impl ToPyWrapper for ast::ExprNamedExpr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprNamedExpr(self).to_object(py)) } } @@ -1593,38 +1593,38 @@ impl ExprNamedExpr { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_BinOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprBinOp(pub &'static crate::ExprBinOp); +pub struct ExprBinOp(pub &'static ast::ExprBinOp); -impl From<&'static crate::ExprBinOp> for ExprBinOp { - fn from(node: &'static crate::ExprBinOp) -> Self { +impl From<&'static ast::ExprBinOp> for ExprBinOp { + fn from(node: &'static ast::ExprBinOp) -> Self { ExprBinOp(node) } } impl ToPyObject for ExprBinOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprBinOp { +impl ToPyWrapper for ast::ExprBinOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprBinOp(self).to_object(py)) } } @@ -1634,44 +1634,44 @@ impl ExprBinOp { #[getter] #[inline] fn get_left(&self, py: Python) -> PyResult { - self.0.left.to_pyo3_wrapper(py) + self.0.left.to_py_wrapper(py) } #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_right(&self, py: Python) -> PyResult { - self.0.right.to_pyo3_wrapper(py) + self.0.right.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_UnaryOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprUnaryOp(pub &'static crate::ExprUnaryOp); +pub struct ExprUnaryOp(pub &'static ast::ExprUnaryOp); -impl From<&'static crate::ExprUnaryOp> for ExprUnaryOp { - fn from(node: &'static crate::ExprUnaryOp) -> Self { +impl From<&'static ast::ExprUnaryOp> for ExprUnaryOp { + fn from(node: &'static ast::ExprUnaryOp) -> Self { ExprUnaryOp(node) } } impl ToPyObject for ExprUnaryOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprUnaryOp { +impl ToPyWrapper for ast::ExprUnaryOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprUnaryOp(self).to_object(py)) } } @@ -1681,38 +1681,38 @@ impl ExprUnaryOp { #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_operand(&self, py: Python) -> PyResult { - self.0.operand.to_pyo3_wrapper(py) + self.0.operand.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Lambda", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprLambda(pub &'static crate::ExprLambda); +pub struct ExprLambda(pub &'static ast::ExprLambda); -impl From<&'static crate::ExprLambda> for ExprLambda { - fn from(node: &'static crate::ExprLambda) -> Self { +impl From<&'static ast::ExprLambda> for ExprLambda { + fn from(node: &'static ast::ExprLambda) -> Self { ExprLambda(node) } } impl ToPyObject for ExprLambda { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprLambda { +impl ToPyWrapper for ast::ExprLambda { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprLambda(self).to_object(py)) } } @@ -1722,38 +1722,38 @@ impl ExprLambda { #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_IfExp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprIfExp(pub &'static crate::ExprIfExp); +pub struct ExprIfExp(pub &'static ast::ExprIfExp); -impl From<&'static crate::ExprIfExp> for ExprIfExp { - fn from(node: &'static crate::ExprIfExp) -> Self { +impl From<&'static ast::ExprIfExp> for ExprIfExp { + fn from(node: &'static ast::ExprIfExp) -> Self { ExprIfExp(node) } } impl ToPyObject for ExprIfExp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprIfExp { +impl ToPyWrapper for ast::ExprIfExp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprIfExp(self).to_object(py)) } } @@ -1763,44 +1763,44 @@ impl ExprIfExp { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Dict", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprDict(pub &'static crate::ExprDict); +pub struct ExprDict(pub &'static ast::ExprDict); -impl From<&'static crate::ExprDict> for ExprDict { - fn from(node: &'static crate::ExprDict) -> Self { +impl From<&'static ast::ExprDict> for ExprDict { + fn from(node: &'static ast::ExprDict) -> Self { ExprDict(node) } } impl ToPyObject for ExprDict { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprDict { +impl ToPyWrapper for ast::ExprDict { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprDict(self).to_object(py)) } } @@ -1810,38 +1810,38 @@ impl ExprDict { #[getter] #[inline] fn get_keys(&self, py: Python) -> PyResult { - self.0.keys.to_pyo3_wrapper(py) + self.0.keys.to_py_wrapper(py) } #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Set", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSet(pub &'static crate::ExprSet); +pub struct ExprSet(pub &'static ast::ExprSet); -impl From<&'static crate::ExprSet> for ExprSet { - fn from(node: &'static crate::ExprSet) -> Self { +impl From<&'static ast::ExprSet> for ExprSet { + fn from(node: &'static ast::ExprSet) -> Self { ExprSet(node) } } impl ToPyObject for ExprSet { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSet { +impl ToPyWrapper for ast::ExprSet { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSet(self).to_object(py)) } } @@ -1851,32 +1851,32 @@ impl ExprSet { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_ListComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprListComp(pub &'static crate::ExprListComp); +pub struct ExprListComp(pub &'static ast::ExprListComp); -impl From<&'static crate::ExprListComp> for ExprListComp { - fn from(node: &'static crate::ExprListComp) -> Self { +impl From<&'static ast::ExprListComp> for ExprListComp { + fn from(node: &'static ast::ExprListComp) -> Self { ExprListComp(node) } } impl ToPyObject for ExprListComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprListComp { +impl ToPyWrapper for ast::ExprListComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprListComp(self).to_object(py)) } } @@ -1886,38 +1886,38 @@ impl ExprListComp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_SetComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSetComp(pub &'static crate::ExprSetComp); +pub struct ExprSetComp(pub &'static ast::ExprSetComp); -impl From<&'static crate::ExprSetComp> for ExprSetComp { - fn from(node: &'static crate::ExprSetComp) -> Self { +impl From<&'static ast::ExprSetComp> for ExprSetComp { + fn from(node: &'static ast::ExprSetComp) -> Self { ExprSetComp(node) } } impl ToPyObject for ExprSetComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSetComp { +impl ToPyWrapper for ast::ExprSetComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSetComp(self).to_object(py)) } } @@ -1927,38 +1927,38 @@ impl ExprSetComp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_DictComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprDictComp(pub &'static crate::ExprDictComp); +pub struct ExprDictComp(pub &'static ast::ExprDictComp); -impl From<&'static crate::ExprDictComp> for ExprDictComp { - fn from(node: &'static crate::ExprDictComp) -> Self { +impl From<&'static ast::ExprDictComp> for ExprDictComp { + fn from(node: &'static ast::ExprDictComp) -> Self { ExprDictComp(node) } } impl ToPyObject for ExprDictComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprDictComp { +impl ToPyWrapper for ast::ExprDictComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprDictComp(self).to_object(py)) } } @@ -1968,44 +1968,44 @@ impl ExprDictComp { #[getter] #[inline] fn get_key(&self, py: Python) -> PyResult { - self.0.key.to_pyo3_wrapper(py) + self.0.key.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_GeneratorExp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprGeneratorExp(pub &'static crate::ExprGeneratorExp); +pub struct ExprGeneratorExp(pub &'static ast::ExprGeneratorExp); -impl From<&'static crate::ExprGeneratorExp> for ExprGeneratorExp { - fn from(node: &'static crate::ExprGeneratorExp) -> Self { +impl From<&'static ast::ExprGeneratorExp> for ExprGeneratorExp { + fn from(node: &'static ast::ExprGeneratorExp) -> Self { ExprGeneratorExp(node) } } impl ToPyObject for ExprGeneratorExp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprGeneratorExp { +impl ToPyWrapper for ast::ExprGeneratorExp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprGeneratorExp(self).to_object(py)) } } @@ -2015,38 +2015,38 @@ impl ExprGeneratorExp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Await", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprAwait(pub &'static crate::ExprAwait); +pub struct ExprAwait(pub &'static ast::ExprAwait); -impl From<&'static crate::ExprAwait> for ExprAwait { - fn from(node: &'static crate::ExprAwait) -> Self { +impl From<&'static ast::ExprAwait> for ExprAwait { + fn from(node: &'static ast::ExprAwait) -> Self { ExprAwait(node) } } impl ToPyObject for ExprAwait { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprAwait { +impl ToPyWrapper for ast::ExprAwait { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprAwait(self).to_object(py)) } } @@ -2056,32 +2056,32 @@ impl ExprAwait { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Yield", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprYield(pub &'static crate::ExprYield); +pub struct ExprYield(pub &'static ast::ExprYield); -impl From<&'static crate::ExprYield> for ExprYield { - fn from(node: &'static crate::ExprYield) -> Self { +impl From<&'static ast::ExprYield> for ExprYield { + fn from(node: &'static ast::ExprYield) -> Self { ExprYield(node) } } impl ToPyObject for ExprYield { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprYield { +impl ToPyWrapper for ast::ExprYield { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprYield(self).to_object(py)) } } @@ -2091,32 +2091,32 @@ impl ExprYield { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_YieldFrom", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprYieldFrom(pub &'static crate::ExprYieldFrom); +pub struct ExprYieldFrom(pub &'static ast::ExprYieldFrom); -impl From<&'static crate::ExprYieldFrom> for ExprYieldFrom { - fn from(node: &'static crate::ExprYieldFrom) -> Self { +impl From<&'static ast::ExprYieldFrom> for ExprYieldFrom { + fn from(node: &'static ast::ExprYieldFrom) -> Self { ExprYieldFrom(node) } } impl ToPyObject for ExprYieldFrom { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprYieldFrom { +impl ToPyWrapper for ast::ExprYieldFrom { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprYieldFrom(self).to_object(py)) } } @@ -2126,32 +2126,32 @@ impl ExprYieldFrom { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Compare", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprCompare(pub &'static crate::ExprCompare); +pub struct ExprCompare(pub &'static ast::ExprCompare); -impl From<&'static crate::ExprCompare> for ExprCompare { - fn from(node: &'static crate::ExprCompare) -> Self { +impl From<&'static ast::ExprCompare> for ExprCompare { + fn from(node: &'static ast::ExprCompare) -> Self { ExprCompare(node) } } impl ToPyObject for ExprCompare { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprCompare { +impl ToPyWrapper for ast::ExprCompare { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprCompare(self).to_object(py)) } } @@ -2161,44 +2161,44 @@ impl ExprCompare { #[getter] #[inline] fn get_left(&self, py: Python) -> PyResult { - self.0.left.to_pyo3_wrapper(py) + self.0.left.to_py_wrapper(py) } #[getter] #[inline] fn get_ops(&self, py: Python) -> PyResult { - self.0.ops.to_pyo3_wrapper(py) + self.0.ops.to_py_wrapper(py) } #[getter] #[inline] fn get_comparators(&self, py: Python) -> PyResult { - self.0.comparators.to_pyo3_wrapper(py) + self.0.comparators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Call", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprCall(pub &'static crate::ExprCall); +pub struct ExprCall(pub &'static ast::ExprCall); -impl From<&'static crate::ExprCall> for ExprCall { - fn from(node: &'static crate::ExprCall) -> Self { +impl From<&'static ast::ExprCall> for ExprCall { + fn from(node: &'static ast::ExprCall) -> Self { ExprCall(node) } } impl ToPyObject for ExprCall { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprCall { +impl ToPyWrapper for ast::ExprCall { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprCall(self).to_object(py)) } } @@ -2208,44 +2208,44 @@ impl ExprCall { #[getter] #[inline] fn get_func(&self, py: Python) -> PyResult { - self.0.func.to_pyo3_wrapper(py) + self.0.func.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_keywords(&self, py: Python) -> PyResult { - self.0.keywords.to_pyo3_wrapper(py) + self.0.keywords.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_FormattedValue", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprFormattedValue(pub &'static crate::ExprFormattedValue); +pub struct ExprFormattedValue(pub &'static ast::ExprFormattedValue); -impl From<&'static crate::ExprFormattedValue> for ExprFormattedValue { - fn from(node: &'static crate::ExprFormattedValue) -> Self { +impl From<&'static ast::ExprFormattedValue> for ExprFormattedValue { + fn from(node: &'static ast::ExprFormattedValue) -> Self { ExprFormattedValue(node) } } impl ToPyObject for ExprFormattedValue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprFormattedValue { +impl ToPyWrapper for ast::ExprFormattedValue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprFormattedValue(self).to_object(py)) } } @@ -2255,44 +2255,44 @@ impl ExprFormattedValue { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_conversion(&self, py: Python) -> PyResult { - self.0.conversion.to_pyo3_wrapper(py) + self.0.conversion.to_py_wrapper(py) } #[getter] #[inline] fn get_format_spec(&self, py: Python) -> PyResult { - self.0.format_spec.to_pyo3_wrapper(py) + self.0.format_spec.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_JoinedStr", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprJoinedStr(pub &'static crate::ExprJoinedStr); +pub struct ExprJoinedStr(pub &'static ast::ExprJoinedStr); -impl From<&'static crate::ExprJoinedStr> for ExprJoinedStr { - fn from(node: &'static crate::ExprJoinedStr) -> Self { +impl From<&'static ast::ExprJoinedStr> for ExprJoinedStr { + fn from(node: &'static ast::ExprJoinedStr) -> Self { ExprJoinedStr(node) } } impl ToPyObject for ExprJoinedStr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprJoinedStr { +impl ToPyWrapper for ast::ExprJoinedStr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprJoinedStr(self).to_object(py)) } } @@ -2302,32 +2302,32 @@ impl ExprJoinedStr { #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Constant", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprConstant(pub &'static crate::ExprConstant); +pub struct ExprConstant(pub &'static ast::ExprConstant); -impl From<&'static crate::ExprConstant> for ExprConstant { - fn from(node: &'static crate::ExprConstant) -> Self { +impl From<&'static ast::ExprConstant> for ExprConstant { + fn from(node: &'static ast::ExprConstant) -> Self { ExprConstant(node) } } impl ToPyObject for ExprConstant { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprConstant { +impl ToPyWrapper for ast::ExprConstant { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprConstant(self).to_object(py)) } } @@ -2337,38 +2337,38 @@ impl ExprConstant { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_kind(&self, py: Python) -> PyResult { - self.0.kind.to_pyo3_wrapper(py) + self.0.kind.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Attribute", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprAttribute(pub &'static crate::ExprAttribute); +pub struct ExprAttribute(pub &'static ast::ExprAttribute); -impl From<&'static crate::ExprAttribute> for ExprAttribute { - fn from(node: &'static crate::ExprAttribute) -> Self { +impl From<&'static ast::ExprAttribute> for ExprAttribute { + fn from(node: &'static ast::ExprAttribute) -> Self { ExprAttribute(node) } } impl ToPyObject for ExprAttribute { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprAttribute { +impl ToPyWrapper for ast::ExprAttribute { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprAttribute(self).to_object(py)) } } @@ -2378,44 +2378,44 @@ impl ExprAttribute { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_attr(&self, py: Python) -> PyResult { - self.0.attr.to_pyo3_wrapper(py) + self.0.attr.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Subscript", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSubscript(pub &'static crate::ExprSubscript); +pub struct ExprSubscript(pub &'static ast::ExprSubscript); -impl From<&'static crate::ExprSubscript> for ExprSubscript { - fn from(node: &'static crate::ExprSubscript) -> Self { +impl From<&'static ast::ExprSubscript> for ExprSubscript { + fn from(node: &'static ast::ExprSubscript) -> Self { ExprSubscript(node) } } impl ToPyObject for ExprSubscript { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSubscript { +impl ToPyWrapper for ast::ExprSubscript { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSubscript(self).to_object(py)) } } @@ -2425,44 +2425,44 @@ impl ExprSubscript { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_slice(&self, py: Python) -> PyResult { - self.0.slice.to_pyo3_wrapper(py) + self.0.slice.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Starred", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprStarred(pub &'static crate::ExprStarred); +pub struct ExprStarred(pub &'static ast::ExprStarred); -impl From<&'static crate::ExprStarred> for ExprStarred { - fn from(node: &'static crate::ExprStarred) -> Self { +impl From<&'static ast::ExprStarred> for ExprStarred { + fn from(node: &'static ast::ExprStarred) -> Self { ExprStarred(node) } } impl ToPyObject for ExprStarred { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprStarred { +impl ToPyWrapper for ast::ExprStarred { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprStarred(self).to_object(py)) } } @@ -2472,38 +2472,38 @@ impl ExprStarred { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Name", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprName(pub &'static crate::ExprName); +pub struct ExprName(pub &'static ast::ExprName); -impl From<&'static crate::ExprName> for ExprName { - fn from(node: &'static crate::ExprName) -> Self { +impl From<&'static ast::ExprName> for ExprName { + fn from(node: &'static ast::ExprName) -> Self { ExprName(node) } } impl ToPyObject for ExprName { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprName { +impl ToPyWrapper for ast::ExprName { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprName(self).to_object(py)) } } @@ -2513,38 +2513,38 @@ impl ExprName { #[getter] #[inline] fn get_id(&self, py: Python) -> PyResult { - self.0.id.to_pyo3_wrapper(py) + self.0.id.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_List", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprList(pub &'static crate::ExprList); +pub struct ExprList(pub &'static ast::ExprList); -impl From<&'static crate::ExprList> for ExprList { - fn from(node: &'static crate::ExprList) -> Self { +impl From<&'static ast::ExprList> for ExprList { + fn from(node: &'static ast::ExprList) -> Self { ExprList(node) } } impl ToPyObject for ExprList { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprList { +impl ToPyWrapper for ast::ExprList { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprList(self).to_object(py)) } } @@ -2554,38 +2554,38 @@ impl ExprList { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Tuple", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprTuple(pub &'static crate::ExprTuple); +pub struct ExprTuple(pub &'static ast::ExprTuple); -impl From<&'static crate::ExprTuple> for ExprTuple { - fn from(node: &'static crate::ExprTuple) -> Self { +impl From<&'static ast::ExprTuple> for ExprTuple { + fn from(node: &'static ast::ExprTuple) -> Self { ExprTuple(node) } } impl ToPyObject for ExprTuple { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprTuple { +impl ToPyWrapper for ast::ExprTuple { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprTuple(self).to_object(py)) } } @@ -2595,38 +2595,38 @@ impl ExprTuple { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_Slice", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSlice(pub &'static crate::ExprSlice); +pub struct ExprSlice(pub &'static ast::ExprSlice); -impl From<&'static crate::ExprSlice> for ExprSlice { - fn from(node: &'static crate::ExprSlice) -> Self { +impl From<&'static ast::ExprSlice> for ExprSlice { + fn from(node: &'static ast::ExprSlice) -> Self { ExprSlice(node) } } impl ToPyObject for ExprSlice { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSlice { +impl ToPyWrapper for ast::ExprSlice { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSlice(self).to_object(py)) } } @@ -2636,28 +2636,28 @@ impl ExprSlice { #[getter] #[inline] fn get_lower(&self, py: Python) -> PyResult { - self.0.lower.to_pyo3_wrapper(py) + self.0.lower.to_py_wrapper(py) } #[getter] #[inline] fn get_upper(&self, py: Python) -> PyResult { - self.0.upper.to_pyo3_wrapper(py) + self.0.upper.to_py_wrapper(py) } #[getter] #[inline] fn get_step(&self, py: Python) -> PyResult { - self.0.step.to_pyo3_wrapper(py) + self.0.step.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_expr_context", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_expr_context", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct ExprContext; -impl From<&'static crate::ExprContext> for ExprContext { - fn from(_node: &'static crate::ExprContext) -> Self { +impl From<&'static ast::ExprContext> for ExprContext { + fn from(_node: &'static ast::ExprContext) -> Self { ExprContext } } @@ -2666,7 +2666,7 @@ impl From<&'static crate::ExprContext> for ExprContext { impl ExprContext { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for ExprContext { @@ -2681,7 +2681,7 @@ pub struct ExprContextLoad; impl ToPyObject for ExprContextLoad { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2693,7 +2693,7 @@ pub struct ExprContextStore; impl ToPyObject for ExprContextStore { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2705,19 +2705,19 @@ pub struct ExprContextDel; impl ToPyObject for ExprContextDel { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.located", name="_boolop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_boolop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Boolop; -impl From<&'static crate::Boolop> for Boolop { - fn from(_node: &'static crate::Boolop) -> Self { +impl From<&'static ast::Boolop> for Boolop { + fn from(_node: &'static ast::Boolop) -> Self { Boolop } } @@ -2726,7 +2726,7 @@ impl From<&'static crate::Boolop> for Boolop { impl Boolop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Boolop { @@ -2741,7 +2741,7 @@ pub struct BoolopAnd; impl ToPyObject for BoolopAnd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Boolop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2753,19 +2753,19 @@ pub struct BoolopOr; impl ToPyObject for BoolopOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Boolop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.located", name="_operator", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_operator", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Operator; -impl From<&'static crate::Operator> for Operator { - fn from(_node: &'static crate::Operator) -> Self { +impl From<&'static ast::Operator> for Operator { + fn from(_node: &'static ast::Operator) -> Self { Operator } } @@ -2774,7 +2774,7 @@ impl From<&'static crate::Operator> for Operator { impl Operator { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Operator { @@ -2789,7 +2789,7 @@ pub struct OperatorAdd; impl ToPyObject for OperatorAdd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2801,7 +2801,7 @@ pub struct OperatorSub; impl ToPyObject for OperatorSub { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2813,7 +2813,7 @@ pub struct OperatorMult; impl ToPyObject for OperatorMult { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2825,7 +2825,7 @@ pub struct OperatorMatMult; impl ToPyObject for OperatorMatMult { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2837,7 +2837,7 @@ pub struct OperatorDiv; impl ToPyObject for OperatorDiv { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2849,7 +2849,7 @@ pub struct OperatorMod; impl ToPyObject for OperatorMod { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2861,7 +2861,7 @@ pub struct OperatorPow; impl ToPyObject for OperatorPow { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2873,7 +2873,7 @@ pub struct OperatorLShift; impl ToPyObject for OperatorLShift { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2885,7 +2885,7 @@ pub struct OperatorRShift; impl ToPyObject for OperatorRShift { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2897,7 +2897,7 @@ pub struct OperatorBitOr; impl ToPyObject for OperatorBitOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2909,7 +2909,7 @@ pub struct OperatorBitXor; impl ToPyObject for OperatorBitXor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2921,7 +2921,7 @@ pub struct OperatorBitAnd; impl ToPyObject for OperatorBitAnd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2933,19 +2933,19 @@ pub struct OperatorFloorDiv; impl ToPyObject for OperatorFloorDiv { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.located", name="_unaryop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_unaryop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Unaryop; -impl From<&'static crate::Unaryop> for Unaryop { - fn from(_node: &'static crate::Unaryop) -> Self { +impl From<&'static ast::Unaryop> for Unaryop { + fn from(_node: &'static ast::Unaryop) -> Self { Unaryop } } @@ -2954,7 +2954,7 @@ impl From<&'static crate::Unaryop> for Unaryop { impl Unaryop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Unaryop { @@ -2969,7 +2969,7 @@ pub struct UnaryopInvert; impl ToPyObject for UnaryopInvert { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2981,7 +2981,7 @@ pub struct UnaryopNot; impl ToPyObject for UnaryopNot { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2993,7 +2993,7 @@ pub struct UnaryopUAdd; impl ToPyObject for UnaryopUAdd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3005,19 +3005,19 @@ pub struct UnaryopUSub; impl ToPyObject for UnaryopUSub { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.located", name="_cmpop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_cmpop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Cmpop; -impl From<&'static crate::Cmpop> for Cmpop { - fn from(_node: &'static crate::Cmpop) -> Self { +impl From<&'static ast::Cmpop> for Cmpop { + fn from(_node: &'static ast::Cmpop) -> Self { Cmpop } } @@ -3026,7 +3026,7 @@ impl From<&'static crate::Cmpop> for Cmpop { impl Cmpop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Cmpop { @@ -3041,7 +3041,7 @@ pub struct CmpopEq; impl ToPyObject for CmpopEq { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3053,7 +3053,7 @@ pub struct CmpopNotEq; impl ToPyObject for CmpopNotEq { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3065,7 +3065,7 @@ pub struct CmpopLt; impl ToPyObject for CmpopLt { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3077,7 +3077,7 @@ pub struct CmpopLtE; impl ToPyObject for CmpopLtE { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3089,7 +3089,7 @@ pub struct CmpopGt; impl ToPyObject for CmpopGt { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3101,7 +3101,7 @@ pub struct CmpopGtE; impl ToPyObject for CmpopGtE { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3113,7 +3113,7 @@ pub struct CmpopIs; impl ToPyObject for CmpopIs { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3125,7 +3125,7 @@ pub struct CmpopIsNot; impl ToPyObject for CmpopIsNot { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3137,7 +3137,7 @@ pub struct CmpopIn; impl ToPyObject for CmpopIn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3149,33 +3149,33 @@ pub struct CmpopNotIn; impl ToPyObject for CmpopNotIn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.located", name="_comprehension", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_comprehension", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Comprehension(pub &'static crate::Comprehension); +pub struct Comprehension(pub &'static ast::Comprehension); -impl From<&'static crate::Comprehension> for Comprehension { - fn from(node: &'static crate::Comprehension) -> Self { +impl From<&'static ast::Comprehension> for Comprehension { + fn from(node: &'static ast::Comprehension) -> Self { Comprehension(node) } } impl ToPyObject for Comprehension { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Comprehension { +impl ToPyWrapper for ast::Comprehension { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Comprehension(self).to_object(py)) } } @@ -3185,34 +3185,34 @@ impl Comprehension { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_ifs(&self, py: Python) -> PyResult { - self.0.ifs.to_pyo3_wrapper(py) + self.0.ifs.to_py_wrapper(py) } #[getter] #[inline] fn get_is_async(&self, py: Python) -> PyResult { - self.0.is_async.to_pyo3_wrapper(py) + self.0.is_async.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_excepthandler", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_excepthandler", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Excepthandler; -impl From<&'static crate::Excepthandler> for Excepthandler { - fn from(_node: &'static crate::Excepthandler) -> Self { +impl From<&'static ast::Excepthandler> for Excepthandler { + fn from(_node: &'static ast::Excepthandler) -> Self { Excepthandler } } @@ -3221,7 +3221,7 @@ impl From<&'static crate::Excepthandler> for Excepthandler { impl Excepthandler { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Excepthandler { @@ -3231,37 +3231,37 @@ impl ToPyObject for Excepthandler { } } -impl ToPyo3Wrapper for crate::Excepthandler { +impl ToPyWrapper for ast::Excepthandler { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::ExceptHandler(cons) => cons.to_pyo3_wrapper(py), + Self::ExceptHandler(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_ExceptHandler", extends=Excepthandler, frozen)] #[derive(Clone, Debug)] -pub struct ExcepthandlerExceptHandler(pub &'static crate::ExcepthandlerExceptHandler); +pub struct ExcepthandlerExceptHandler(pub &'static ast::ExcepthandlerExceptHandler); -impl From<&'static crate::ExcepthandlerExceptHandler> for ExcepthandlerExceptHandler { - fn from(node: &'static crate::ExcepthandlerExceptHandler) -> Self { +impl From<&'static ast::ExcepthandlerExceptHandler> for ExcepthandlerExceptHandler { + fn from(node: &'static ast::ExcepthandlerExceptHandler) -> Self { ExcepthandlerExceptHandler(node) } } impl ToPyObject for ExcepthandlerExceptHandler { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Excepthandler) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExcepthandlerExceptHandler { +impl ToPyWrapper for ast::ExcepthandlerExceptHandler { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExcepthandlerExceptHandler(self).to_object(py)) } } @@ -3271,42 +3271,42 @@ impl ExcepthandlerExceptHandler { #[getter] #[inline] fn get_type(&self, py: Python) -> PyResult { - self.0.type_.to_pyo3_wrapper(py) + self.0.type_.to_py_wrapper(py) } #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_arguments", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_arguments", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Arguments(pub &'static crate::Arguments); +pub struct Arguments(pub &'static ast::Arguments); -impl From<&'static crate::Arguments> for Arguments { - fn from(node: &'static crate::Arguments) -> Self { +impl From<&'static ast::Arguments> for Arguments { + fn from(node: &'static ast::Arguments) -> Self { Arguments(node) } } impl ToPyObject for Arguments { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Arguments { +impl ToPyWrapper for ast::Arguments { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Arguments(self).to_object(py)) } } @@ -3316,66 +3316,66 @@ impl Arguments { #[getter] #[inline] fn get_posonlyargs(&self, py: Python) -> PyResult { - self.0.posonlyargs.to_pyo3_wrapper(py) + self.0.posonlyargs.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_vararg(&self, py: Python) -> PyResult { - self.0.vararg.to_pyo3_wrapper(py) + self.0.vararg.to_py_wrapper(py) } #[getter] #[inline] fn get_kwonlyargs(&self, py: Python) -> PyResult { - self.0.kwonlyargs.to_pyo3_wrapper(py) + self.0.kwonlyargs.to_py_wrapper(py) } #[getter] #[inline] fn get_kw_defaults(&self, py: Python) -> PyResult { - self.0.kw_defaults.to_pyo3_wrapper(py) + self.0.kw_defaults.to_py_wrapper(py) } #[getter] #[inline] fn get_kwarg(&self, py: Python) -> PyResult { - self.0.kwarg.to_pyo3_wrapper(py) + self.0.kwarg.to_py_wrapper(py) } #[getter] #[inline] fn get_defaults(&self, py: Python) -> PyResult { - self.0.defaults.to_pyo3_wrapper(py) + self.0.defaults.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_arg", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_arg", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Arg(pub &'static crate::Arg); +pub struct Arg(pub &'static ast::Arg); -impl From<&'static crate::Arg> for Arg { - fn from(node: &'static crate::Arg) -> Self { +impl From<&'static ast::Arg> for Arg { + fn from(node: &'static ast::Arg) -> Self { Arg(node) } } impl ToPyObject for Arg { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Arg { +impl ToPyWrapper for ast::Arg { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Arg(self).to_object(py)) } } @@ -3385,42 +3385,42 @@ impl Arg { #[getter] #[inline] fn get_arg(&self, py: Python) -> PyResult { - self.0.arg.to_pyo3_wrapper(py) + self.0.arg.to_py_wrapper(py) } #[getter] #[inline] fn get_annotation(&self, py: Python) -> PyResult { - self.0.annotation.to_pyo3_wrapper(py) + self.0.annotation.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_keyword", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_keyword", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Keyword(pub &'static crate::Keyword); +pub struct Keyword(pub &'static ast::Keyword); -impl From<&'static crate::Keyword> for Keyword { - fn from(node: &'static crate::Keyword) -> Self { +impl From<&'static ast::Keyword> for Keyword { + fn from(node: &'static ast::Keyword) -> Self { Keyword(node) } } impl ToPyObject for Keyword { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Keyword { +impl ToPyWrapper for ast::Keyword { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Keyword(self).to_object(py)) } } @@ -3430,36 +3430,36 @@ impl Keyword { #[getter] #[inline] fn get_arg(&self, py: Python) -> PyResult { - self.0.arg.to_pyo3_wrapper(py) + self.0.arg.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_alias", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_alias", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Alias(pub &'static crate::Alias); +pub struct Alias(pub &'static ast::Alias); -impl From<&'static crate::Alias> for Alias { - fn from(node: &'static crate::Alias) -> Self { +impl From<&'static ast::Alias> for Alias { + fn from(node: &'static ast::Alias) -> Self { Alias(node) } } impl ToPyObject for Alias { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Alias { +impl ToPyWrapper for ast::Alias { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Alias(self).to_object(py)) } } @@ -3469,36 +3469,36 @@ impl Alias { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_asname(&self, py: Python) -> PyResult { - self.0.asname.to_pyo3_wrapper(py) + self.0.asname.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_withitem", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_withitem", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Withitem(pub &'static crate::Withitem); +pub struct Withitem(pub &'static ast::Withitem); -impl From<&'static crate::Withitem> for Withitem { - fn from(node: &'static crate::Withitem) -> Self { +impl From<&'static ast::Withitem> for Withitem { + fn from(node: &'static ast::Withitem) -> Self { Withitem(node) } } impl ToPyObject for Withitem { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Withitem { +impl ToPyWrapper for ast::Withitem { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Withitem(self).to_object(py)) } } @@ -3508,36 +3508,36 @@ impl Withitem { #[getter] #[inline] fn get_context_expr(&self, py: Python) -> PyResult { - self.0.context_expr.to_pyo3_wrapper(py) + self.0.context_expr.to_py_wrapper(py) } #[getter] #[inline] fn get_optional_vars(&self, py: Python) -> PyResult { - self.0.optional_vars.to_pyo3_wrapper(py) + self.0.optional_vars.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_match_case", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.located", name="_match_case", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct MatchCase(pub &'static crate::MatchCase); +pub struct MatchCase(pub &'static ast::MatchCase); -impl From<&'static crate::MatchCase> for MatchCase { - fn from(node: &'static crate::MatchCase) -> Self { +impl From<&'static ast::MatchCase> for MatchCase { + fn from(node: &'static ast::MatchCase) -> Self { MatchCase(node) } } impl ToPyObject for MatchCase { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::MatchCase { +impl ToPyWrapper for ast::MatchCase { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(MatchCase(self).to_object(py)) } } @@ -3547,28 +3547,28 @@ impl MatchCase { #[getter] #[inline] fn get_pattern(&self, py: Python) -> PyResult { - self.0.pattern.to_pyo3_wrapper(py) + self.0.pattern.to_py_wrapper(py) } #[getter] #[inline] fn get_guard(&self, py: Python) -> PyResult { - self.0.guard.to_pyo3_wrapper(py) + self.0.guard.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_pattern", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_pattern", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Pattern; -impl From<&'static crate::Pattern> for Pattern { - fn from(_node: &'static crate::Pattern) -> Self { +impl From<&'static ast::Pattern> for Pattern { + fn from(_node: &'static ast::Pattern) -> Self { Pattern } } @@ -3577,7 +3577,7 @@ impl From<&'static crate::Pattern> for Pattern { impl Pattern { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Pattern { @@ -3587,44 +3587,44 @@ impl ToPyObject for Pattern { } } -impl ToPyo3Wrapper for crate::Pattern { +impl ToPyWrapper for ast::Pattern { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::MatchValue(cons) => cons.to_pyo3_wrapper(py), - Self::MatchSingleton(cons) => cons.to_pyo3_wrapper(py), - Self::MatchSequence(cons) => cons.to_pyo3_wrapper(py), - Self::MatchMapping(cons) => cons.to_pyo3_wrapper(py), - Self::MatchClass(cons) => cons.to_pyo3_wrapper(py), - Self::MatchStar(cons) => cons.to_pyo3_wrapper(py), - Self::MatchAs(cons) => cons.to_pyo3_wrapper(py), - Self::MatchOr(cons) => cons.to_pyo3_wrapper(py), + Self::MatchValue(cons) => cons.to_py_wrapper(py), + Self::MatchSingleton(cons) => cons.to_py_wrapper(py), + Self::MatchSequence(cons) => cons.to_py_wrapper(py), + Self::MatchMapping(cons) => cons.to_py_wrapper(py), + Self::MatchClass(cons) => cons.to_py_wrapper(py), + Self::MatchStar(cons) => cons.to_py_wrapper(py), + Self::MatchAs(cons) => cons.to_py_wrapper(py), + Self::MatchOr(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_MatchValue", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchValue(pub &'static crate::PatternMatchValue); +pub struct PatternMatchValue(pub &'static ast::PatternMatchValue); -impl From<&'static crate::PatternMatchValue> for PatternMatchValue { - fn from(node: &'static crate::PatternMatchValue) -> Self { +impl From<&'static ast::PatternMatchValue> for PatternMatchValue { + fn from(node: &'static ast::PatternMatchValue) -> Self { PatternMatchValue(node) } } impl ToPyObject for PatternMatchValue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchValue { +impl ToPyWrapper for ast::PatternMatchValue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchValue(self).to_object(py)) } } @@ -3634,32 +3634,32 @@ impl PatternMatchValue { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchSingleton", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchSingleton(pub &'static crate::PatternMatchSingleton); +pub struct PatternMatchSingleton(pub &'static ast::PatternMatchSingleton); -impl From<&'static crate::PatternMatchSingleton> for PatternMatchSingleton { - fn from(node: &'static crate::PatternMatchSingleton) -> Self { +impl From<&'static ast::PatternMatchSingleton> for PatternMatchSingleton { + fn from(node: &'static ast::PatternMatchSingleton) -> Self { PatternMatchSingleton(node) } } impl ToPyObject for PatternMatchSingleton { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchSingleton { +impl ToPyWrapper for ast::PatternMatchSingleton { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchSingleton(self).to_object(py)) } } @@ -3669,32 +3669,32 @@ impl PatternMatchSingleton { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchSequence", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchSequence(pub &'static crate::PatternMatchSequence); +pub struct PatternMatchSequence(pub &'static ast::PatternMatchSequence); -impl From<&'static crate::PatternMatchSequence> for PatternMatchSequence { - fn from(node: &'static crate::PatternMatchSequence) -> Self { +impl From<&'static ast::PatternMatchSequence> for PatternMatchSequence { + fn from(node: &'static ast::PatternMatchSequence) -> Self { PatternMatchSequence(node) } } impl ToPyObject for PatternMatchSequence { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchSequence { +impl ToPyWrapper for ast::PatternMatchSequence { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchSequence(self).to_object(py)) } } @@ -3704,32 +3704,32 @@ impl PatternMatchSequence { #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchMapping", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchMapping(pub &'static crate::PatternMatchMapping); +pub struct PatternMatchMapping(pub &'static ast::PatternMatchMapping); -impl From<&'static crate::PatternMatchMapping> for PatternMatchMapping { - fn from(node: &'static crate::PatternMatchMapping) -> Self { +impl From<&'static ast::PatternMatchMapping> for PatternMatchMapping { + fn from(node: &'static ast::PatternMatchMapping) -> Self { PatternMatchMapping(node) } } impl ToPyObject for PatternMatchMapping { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchMapping { +impl ToPyWrapper for ast::PatternMatchMapping { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchMapping(self).to_object(py)) } } @@ -3739,44 +3739,44 @@ impl PatternMatchMapping { #[getter] #[inline] fn get_keys(&self, py: Python) -> PyResult { - self.0.keys.to_pyo3_wrapper(py) + self.0.keys.to_py_wrapper(py) } #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } #[getter] #[inline] fn get_rest(&self, py: Python) -> PyResult { - self.0.rest.to_pyo3_wrapper(py) + self.0.rest.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchClass", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchClass(pub &'static crate::PatternMatchClass); +pub struct PatternMatchClass(pub &'static ast::PatternMatchClass); -impl From<&'static crate::PatternMatchClass> for PatternMatchClass { - fn from(node: &'static crate::PatternMatchClass) -> Self { +impl From<&'static ast::PatternMatchClass> for PatternMatchClass { + fn from(node: &'static ast::PatternMatchClass) -> Self { PatternMatchClass(node) } } impl ToPyObject for PatternMatchClass { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchClass { +impl ToPyWrapper for ast::PatternMatchClass { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchClass(self).to_object(py)) } } @@ -3786,50 +3786,50 @@ impl PatternMatchClass { #[getter] #[inline] fn get_cls(&self, py: Python) -> PyResult { - self.0.cls.to_pyo3_wrapper(py) + self.0.cls.to_py_wrapper(py) } #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } #[getter] #[inline] fn get_kwd_attrs(&self, py: Python) -> PyResult { - self.0.kwd_attrs.to_pyo3_wrapper(py) + self.0.kwd_attrs.to_py_wrapper(py) } #[getter] #[inline] fn get_kwd_patterns(&self, py: Python) -> PyResult { - self.0.kwd_patterns.to_pyo3_wrapper(py) + self.0.kwd_patterns.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchStar", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchStar(pub &'static crate::PatternMatchStar); +pub struct PatternMatchStar(pub &'static ast::PatternMatchStar); -impl From<&'static crate::PatternMatchStar> for PatternMatchStar { - fn from(node: &'static crate::PatternMatchStar) -> Self { +impl From<&'static ast::PatternMatchStar> for PatternMatchStar { + fn from(node: &'static ast::PatternMatchStar) -> Self { PatternMatchStar(node) } } impl ToPyObject for PatternMatchStar { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchStar { +impl ToPyWrapper for ast::PatternMatchStar { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchStar(self).to_object(py)) } } @@ -3839,32 +3839,32 @@ impl PatternMatchStar { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchAs", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchAs(pub &'static crate::PatternMatchAs); +pub struct PatternMatchAs(pub &'static ast::PatternMatchAs); -impl From<&'static crate::PatternMatchAs> for PatternMatchAs { - fn from(node: &'static crate::PatternMatchAs) -> Self { +impl From<&'static ast::PatternMatchAs> for PatternMatchAs { + fn from(node: &'static ast::PatternMatchAs) -> Self { PatternMatchAs(node) } } impl ToPyObject for PatternMatchAs { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchAs { +impl ToPyWrapper for ast::PatternMatchAs { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchAs(self).to_object(py)) } } @@ -3874,38 +3874,38 @@ impl PatternMatchAs { #[getter] #[inline] fn get_pattern(&self, py: Python) -> PyResult { - self.0.pattern.to_pyo3_wrapper(py) + self.0.pattern.to_py_wrapper(py) } #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.located", name="_MatchOr", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchOr(pub &'static crate::PatternMatchOr); +pub struct PatternMatchOr(pub &'static ast::PatternMatchOr); -impl From<&'static crate::PatternMatchOr> for PatternMatchOr { - fn from(node: &'static crate::PatternMatchOr) -> Self { +impl From<&'static ast::PatternMatchOr> for PatternMatchOr { + fn from(node: &'static ast::PatternMatchOr) -> Self { PatternMatchOr(node) } } impl ToPyObject for PatternMatchOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchOr { +impl ToPyWrapper for ast::PatternMatchOr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchOr(self).to_object(py)) } } @@ -3915,16 +3915,16 @@ impl PatternMatchOr { #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.located", name="_type_ignore", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.located", name="_type_ignore", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct TypeIgnore; -impl From<&'static crate::TypeIgnore> for TypeIgnore { - fn from(_node: &'static crate::TypeIgnore) -> Self { +impl From<&'static ast::TypeIgnore> for TypeIgnore { + fn from(_node: &'static ast::TypeIgnore) -> Self { TypeIgnore } } @@ -3933,7 +3933,7 @@ impl From<&'static crate::TypeIgnore> for TypeIgnore { impl TypeIgnore { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for TypeIgnore { @@ -3943,37 +3943,37 @@ impl ToPyObject for TypeIgnore { } } -impl ToPyo3Wrapper for crate::TypeIgnore { +impl ToPyWrapper for ast::TypeIgnore { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::TypeIgnore(cons) => cons.to_pyo3_wrapper(py), + Self::TypeIgnore(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.located", name="_TypeIgnore", extends=TypeIgnore, frozen)] #[derive(Clone, Debug)] -pub struct TypeIgnoreTypeIgnore(pub &'static crate::TypeIgnoreTypeIgnore); +pub struct TypeIgnoreTypeIgnore(pub &'static ast::TypeIgnoreTypeIgnore); -impl From<&'static crate::TypeIgnoreTypeIgnore> for TypeIgnoreTypeIgnore { - fn from(node: &'static crate::TypeIgnoreTypeIgnore) -> Self { +impl From<&'static ast::TypeIgnoreTypeIgnore> for TypeIgnoreTypeIgnore { + fn from(node: &'static ast::TypeIgnoreTypeIgnore) -> Self { TypeIgnoreTypeIgnore(node) } } impl ToPyObject for TypeIgnoreTypeIgnore { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(TypeIgnore) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::TypeIgnoreTypeIgnore { +impl ToPyWrapper for ast::TypeIgnoreTypeIgnore { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(TypeIgnoreTypeIgnore(self).to_object(py)) } } @@ -3983,19 +3983,19 @@ impl TypeIgnoreTypeIgnore { #[getter] #[inline] fn get_lineno(&self, py: Python) -> PyResult { - self.0.lineno.to_pyo3_wrapper(py) + self.0.lineno.to_py_wrapper(py) } #[getter] #[inline] fn get_tag(&self, py: Python) -> PyResult { - self.0.tag.to_pyo3_wrapper(py) + self.0.tag.to_py_wrapper(py) } } -impl ToPyo3Wrapper for crate::generic::ExprContext { +impl ToPyWrapper for ast::ExprContext { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { match &self { Self::Load => Ok(ExprContextLoad.to_object(py)), Self::Store => Ok(ExprContextStore.to_object(py)), @@ -4004,30 +4004,30 @@ impl ToPyo3Wrapper for crate::generic::ExprContext { } } -impl ToPyo3Wrapper for crate::generic::ExprContextLoad { +impl ToPyWrapper for ast::ExprContextLoad { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(ExprContextLoad.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::ExprContextStore { +impl ToPyWrapper for ast::ExprContextStore { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(ExprContextStore.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::ExprContextDel { +impl ToPyWrapper for ast::ExprContextDel { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(ExprContextDel.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::Boolop { +impl ToPyWrapper for ast::Boolop { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { match &self { Self::And => Ok(BoolopAnd.to_object(py)), Self::Or => Ok(BoolopOr.to_object(py)), @@ -4035,23 +4035,23 @@ impl ToPyo3Wrapper for crate::generic::Boolop { } } -impl ToPyo3Wrapper for crate::generic::BoolopAnd { +impl ToPyWrapper for ast::BoolopAnd { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(BoolopAnd.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::BoolopOr { +impl ToPyWrapper for ast::BoolopOr { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(BoolopOr.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::Operator { +impl ToPyWrapper for ast::Operator { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { match &self { Self::Add => Ok(OperatorAdd.to_object(py)), Self::Sub => Ok(OperatorSub.to_object(py)), @@ -4070,100 +4070,100 @@ impl ToPyo3Wrapper for crate::generic::Operator { } } -impl ToPyo3Wrapper for crate::generic::OperatorAdd { +impl ToPyWrapper for ast::OperatorAdd { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorAdd.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorSub { +impl ToPyWrapper for ast::OperatorSub { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorSub.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorMult { +impl ToPyWrapper for ast::OperatorMult { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorMult.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorMatMult { +impl ToPyWrapper for ast::OperatorMatMult { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorMatMult.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorDiv { +impl ToPyWrapper for ast::OperatorDiv { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorDiv.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorMod { +impl ToPyWrapper for ast::OperatorMod { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorMod.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorPow { +impl ToPyWrapper for ast::OperatorPow { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorPow.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorLShift { +impl ToPyWrapper for ast::OperatorLShift { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorLShift.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorRShift { +impl ToPyWrapper for ast::OperatorRShift { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorRShift.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorBitOr { +impl ToPyWrapper for ast::OperatorBitOr { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorBitOr.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorBitXor { +impl ToPyWrapper for ast::OperatorBitXor { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorBitXor.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorBitAnd { +impl ToPyWrapper for ast::OperatorBitAnd { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorBitAnd.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::OperatorFloorDiv { +impl ToPyWrapper for ast::OperatorFloorDiv { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(OperatorFloorDiv.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::Unaryop { +impl ToPyWrapper for ast::Unaryop { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { match &self { Self::Invert => Ok(UnaryopInvert.to_object(py)), Self::Not => Ok(UnaryopNot.to_object(py)), @@ -4173,37 +4173,37 @@ impl ToPyo3Wrapper for crate::generic::Unaryop { } } -impl ToPyo3Wrapper for crate::generic::UnaryopInvert { +impl ToPyWrapper for ast::UnaryopInvert { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(UnaryopInvert.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::UnaryopNot { +impl ToPyWrapper for ast::UnaryopNot { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(UnaryopNot.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::UnaryopUAdd { +impl ToPyWrapper for ast::UnaryopUAdd { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(UnaryopUAdd.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::UnaryopUSub { +impl ToPyWrapper for ast::UnaryopUSub { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(UnaryopUSub.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::Cmpop { +impl ToPyWrapper for ast::Cmpop { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { match &self { Self::Eq => Ok(CmpopEq.to_object(py)), Self::NotEq => Ok(CmpopNotEq.to_object(py)), @@ -4219,197 +4219,195 @@ impl ToPyo3Wrapper for crate::generic::Cmpop { } } -impl ToPyo3Wrapper for crate::generic::CmpopEq { +impl ToPyWrapper for ast::CmpopEq { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopEq.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopNotEq { +impl ToPyWrapper for ast::CmpopNotEq { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopNotEq.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopLt { +impl ToPyWrapper for ast::CmpopLt { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopLt.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopLtE { +impl ToPyWrapper for ast::CmpopLtE { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopLtE.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopGt { +impl ToPyWrapper for ast::CmpopGt { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopGt.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopGtE { +impl ToPyWrapper for ast::CmpopGtE { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopGtE.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopIs { +impl ToPyWrapper for ast::CmpopIs { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopIs.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopIsNot { +impl ToPyWrapper for ast::CmpopIsNot { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopIsNot.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopIn { +impl ToPyWrapper for ast::CmpopIn { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopIn.to_object(py)) } } -impl ToPyo3Wrapper for crate::generic::CmpopNotIn { +impl ToPyWrapper for ast::CmpopNotIn { #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> { + fn to_py_wrapper(&self, py: Python) -> PyResult> { Ok(CmpopNotIn.to_object(py)) } } pub fn add_to_module(py: Python, m: &PyModule) -> PyResult<()> { super::init_module(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::( - py, m, - )?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; Ok(()) } diff --git a/ast/src/gen/pyo3_wrapper_ranged.rs b/ast-pyo3/src/gen/wrapper_ranged.rs similarity index 55% rename from ast/src/gen/pyo3_wrapper_ranged.rs rename to ast-pyo3/src/gen/wrapper_ranged.rs index dfa0a30..f22a560 100644 --- a/ast/src/gen/pyo3_wrapper_ranged.rs +++ b/ast-pyo3/src/gen/wrapper_ranged.rs @@ -1,11 +1,11 @@ // File automatically generated by ast/asdl_rs.py. -#[pyclass(module="rustpython_ast.ranged", name="_mod", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_mod", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Mod; -impl From<&'static crate::Mod> for Mod { - fn from(_node: &'static crate::Mod) -> Self { +impl From<&'static ast::Mod> for Mod { + fn from(_node: &'static ast::Mod) -> Self { Mod } } @@ -14,7 +14,7 @@ impl From<&'static crate::Mod> for Mod { impl Mod { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Mod { @@ -24,40 +24,40 @@ impl ToPyObject for Mod { } } -impl ToPyo3Wrapper for crate::Mod { +impl ToPyWrapper for ast::Mod { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::Module(cons) => cons.to_pyo3_wrapper(py), - Self::Interactive(cons) => cons.to_pyo3_wrapper(py), - Self::Expression(cons) => cons.to_pyo3_wrapper(py), - Self::FunctionType(cons) => cons.to_pyo3_wrapper(py), + Self::Module(cons) => cons.to_py_wrapper(py), + Self::Interactive(cons) => cons.to_py_wrapper(py), + Self::Expression(cons) => cons.to_py_wrapper(py), + Self::FunctionType(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_Module", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModModule(pub &'static crate::ModModule); +pub struct ModModule(pub &'static ast::ModModule); -impl From<&'static crate::ModModule> for ModModule { - fn from(node: &'static crate::ModModule) -> Self { +impl From<&'static ast::ModModule> for ModModule { + fn from(node: &'static ast::ModModule) -> Self { ModModule(node) } } impl ToPyObject for ModModule { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModModule { +impl ToPyWrapper for ast::ModModule { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModModule(self).to_object(py)) } } @@ -67,38 +67,38 @@ impl ModModule { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_ignores(&self, py: Python) -> PyResult { - self.0.type_ignores.to_pyo3_wrapper(py) + self.0.type_ignores.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Interactive", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModInteractive(pub &'static crate::ModInteractive); +pub struct ModInteractive(pub &'static ast::ModInteractive); -impl From<&'static crate::ModInteractive> for ModInteractive { - fn from(node: &'static crate::ModInteractive) -> Self { +impl From<&'static ast::ModInteractive> for ModInteractive { + fn from(node: &'static ast::ModInteractive) -> Self { ModInteractive(node) } } impl ToPyObject for ModInteractive { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModInteractive { +impl ToPyWrapper for ast::ModInteractive { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModInteractive(self).to_object(py)) } } @@ -108,32 +108,32 @@ impl ModInteractive { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Expression", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModExpression(pub &'static crate::ModExpression); +pub struct ModExpression(pub &'static ast::ModExpression); -impl From<&'static crate::ModExpression> for ModExpression { - fn from(node: &'static crate::ModExpression) -> Self { +impl From<&'static ast::ModExpression> for ModExpression { + fn from(node: &'static ast::ModExpression) -> Self { ModExpression(node) } } impl ToPyObject for ModExpression { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModExpression { +impl ToPyWrapper for ast::ModExpression { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModExpression(self).to_object(py)) } } @@ -143,32 +143,32 @@ impl ModExpression { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_FunctionType", extends=Mod, frozen)] #[derive(Clone, Debug)] -pub struct ModFunctionType(pub &'static crate::ModFunctionType); +pub struct ModFunctionType(pub &'static ast::ModFunctionType); -impl From<&'static crate::ModFunctionType> for ModFunctionType { - fn from(node: &'static crate::ModFunctionType) -> Self { +impl From<&'static ast::ModFunctionType> for ModFunctionType { + fn from(node: &'static ast::ModFunctionType) -> Self { ModFunctionType(node) } } impl ToPyObject for ModFunctionType { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Mod) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ModFunctionType { +impl ToPyWrapper for ast::ModFunctionType { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ModFunctionType(self).to_object(py)) } } @@ -178,22 +178,22 @@ impl ModFunctionType { #[getter] #[inline] fn get_argtypes(&self, py: Python) -> PyResult { - self.0.argtypes.to_pyo3_wrapper(py) + self.0.argtypes.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_stmt", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_stmt", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Stmt; -impl From<&'static crate::Stmt> for Stmt { - fn from(_node: &'static crate::Stmt) -> Self { +impl From<&'static ast::Stmt> for Stmt { + fn from(_node: &'static ast::Stmt) -> Self { Stmt } } @@ -202,7 +202,7 @@ impl From<&'static crate::Stmt> for Stmt { impl Stmt { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Stmt { @@ -212,63 +212,63 @@ impl ToPyObject for Stmt { } } -impl ToPyo3Wrapper for crate::Stmt { +impl ToPyWrapper for ast::Stmt { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::FunctionDef(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncFunctionDef(cons) => cons.to_pyo3_wrapper(py), - Self::ClassDef(cons) => cons.to_pyo3_wrapper(py), - Self::Return(cons) => cons.to_pyo3_wrapper(py), - Self::Delete(cons) => cons.to_pyo3_wrapper(py), - Self::Assign(cons) => cons.to_pyo3_wrapper(py), - Self::AugAssign(cons) => cons.to_pyo3_wrapper(py), - Self::AnnAssign(cons) => cons.to_pyo3_wrapper(py), - Self::For(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncFor(cons) => cons.to_pyo3_wrapper(py), - Self::While(cons) => cons.to_pyo3_wrapper(py), - Self::If(cons) => cons.to_pyo3_wrapper(py), - Self::With(cons) => cons.to_pyo3_wrapper(py), - Self::AsyncWith(cons) => cons.to_pyo3_wrapper(py), - Self::Match(cons) => cons.to_pyo3_wrapper(py), - Self::Raise(cons) => cons.to_pyo3_wrapper(py), - Self::Try(cons) => cons.to_pyo3_wrapper(py), - Self::TryStar(cons) => cons.to_pyo3_wrapper(py), - Self::Assert(cons) => cons.to_pyo3_wrapper(py), - Self::Import(cons) => cons.to_pyo3_wrapper(py), - Self::ImportFrom(cons) => cons.to_pyo3_wrapper(py), - Self::Global(cons) => cons.to_pyo3_wrapper(py), - Self::Nonlocal(cons) => cons.to_pyo3_wrapper(py), - Self::Expr(cons) => cons.to_pyo3_wrapper(py), - Self::Pass(cons) => cons.to_pyo3_wrapper(py), - Self::Break(cons) => cons.to_pyo3_wrapper(py), - Self::Continue(cons) => cons.to_pyo3_wrapper(py), + Self::FunctionDef(cons) => cons.to_py_wrapper(py), + Self::AsyncFunctionDef(cons) => cons.to_py_wrapper(py), + Self::ClassDef(cons) => cons.to_py_wrapper(py), + Self::Return(cons) => cons.to_py_wrapper(py), + Self::Delete(cons) => cons.to_py_wrapper(py), + Self::Assign(cons) => cons.to_py_wrapper(py), + Self::AugAssign(cons) => cons.to_py_wrapper(py), + Self::AnnAssign(cons) => cons.to_py_wrapper(py), + Self::For(cons) => cons.to_py_wrapper(py), + Self::AsyncFor(cons) => cons.to_py_wrapper(py), + Self::While(cons) => cons.to_py_wrapper(py), + Self::If(cons) => cons.to_py_wrapper(py), + Self::With(cons) => cons.to_py_wrapper(py), + Self::AsyncWith(cons) => cons.to_py_wrapper(py), + Self::Match(cons) => cons.to_py_wrapper(py), + Self::Raise(cons) => cons.to_py_wrapper(py), + Self::Try(cons) => cons.to_py_wrapper(py), + Self::TryStar(cons) => cons.to_py_wrapper(py), + Self::Assert(cons) => cons.to_py_wrapper(py), + Self::Import(cons) => cons.to_py_wrapper(py), + Self::ImportFrom(cons) => cons.to_py_wrapper(py), + Self::Global(cons) => cons.to_py_wrapper(py), + Self::Nonlocal(cons) => cons.to_py_wrapper(py), + Self::Expr(cons) => cons.to_py_wrapper(py), + Self::Pass(cons) => cons.to_py_wrapper(py), + Self::Break(cons) => cons.to_py_wrapper(py), + Self::Continue(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_FunctionDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtFunctionDef(pub &'static crate::StmtFunctionDef); +pub struct StmtFunctionDef(pub &'static ast::StmtFunctionDef); -impl From<&'static crate::StmtFunctionDef> for StmtFunctionDef { - fn from(node: &'static crate::StmtFunctionDef) -> Self { +impl From<&'static ast::StmtFunctionDef> for StmtFunctionDef { + fn from(node: &'static ast::StmtFunctionDef) -> Self { StmtFunctionDef(node) } } impl ToPyObject for StmtFunctionDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtFunctionDef { +impl ToPyWrapper for ast::StmtFunctionDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtFunctionDef(self).to_object(py)) } } @@ -278,62 +278,62 @@ impl StmtFunctionDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_AsyncFunctionDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncFunctionDef(pub &'static crate::StmtAsyncFunctionDef); +pub struct StmtAsyncFunctionDef(pub &'static ast::StmtAsyncFunctionDef); -impl From<&'static crate::StmtAsyncFunctionDef> for StmtAsyncFunctionDef { - fn from(node: &'static crate::StmtAsyncFunctionDef) -> Self { +impl From<&'static ast::StmtAsyncFunctionDef> for StmtAsyncFunctionDef { + fn from(node: &'static ast::StmtAsyncFunctionDef) -> Self { StmtAsyncFunctionDef(node) } } impl ToPyObject for StmtAsyncFunctionDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncFunctionDef { +impl ToPyWrapper for ast::StmtAsyncFunctionDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncFunctionDef(self).to_object(py)) } } @@ -343,62 +343,62 @@ impl StmtAsyncFunctionDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } #[getter] #[inline] fn get_returns(&self, py: Python) -> PyResult { - self.0.returns.to_pyo3_wrapper(py) + self.0.returns.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_ClassDef", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtClassDef(pub &'static crate::StmtClassDef); +pub struct StmtClassDef(pub &'static ast::StmtClassDef); -impl From<&'static crate::StmtClassDef> for StmtClassDef { - fn from(node: &'static crate::StmtClassDef) -> Self { +impl From<&'static ast::StmtClassDef> for StmtClassDef { + fn from(node: &'static ast::StmtClassDef) -> Self { StmtClassDef(node) } } impl ToPyObject for StmtClassDef { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtClassDef { +impl ToPyWrapper for ast::StmtClassDef { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtClassDef(self).to_object(py)) } } @@ -408,56 +408,56 @@ impl StmtClassDef { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_bases(&self, py: Python) -> PyResult { - self.0.bases.to_pyo3_wrapper(py) + self.0.bases.to_py_wrapper(py) } #[getter] #[inline] fn get_keywords(&self, py: Python) -> PyResult { - self.0.keywords.to_pyo3_wrapper(py) + self.0.keywords.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_decorator_list(&self, py: Python) -> PyResult { - self.0.decorator_list.to_pyo3_wrapper(py) + self.0.decorator_list.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Return", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtReturn(pub &'static crate::StmtReturn); +pub struct StmtReturn(pub &'static ast::StmtReturn); -impl From<&'static crate::StmtReturn> for StmtReturn { - fn from(node: &'static crate::StmtReturn) -> Self { +impl From<&'static ast::StmtReturn> for StmtReturn { + fn from(node: &'static ast::StmtReturn) -> Self { StmtReturn(node) } } impl ToPyObject for StmtReturn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtReturn { +impl ToPyWrapper for ast::StmtReturn { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtReturn(self).to_object(py)) } } @@ -467,32 +467,32 @@ impl StmtReturn { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Delete", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtDelete(pub &'static crate::StmtDelete); +pub struct StmtDelete(pub &'static ast::StmtDelete); -impl From<&'static crate::StmtDelete> for StmtDelete { - fn from(node: &'static crate::StmtDelete) -> Self { +impl From<&'static ast::StmtDelete> for StmtDelete { + fn from(node: &'static ast::StmtDelete) -> Self { StmtDelete(node) } } impl ToPyObject for StmtDelete { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtDelete { +impl ToPyWrapper for ast::StmtDelete { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtDelete(self).to_object(py)) } } @@ -502,32 +502,32 @@ impl StmtDelete { #[getter] #[inline] fn get_targets(&self, py: Python) -> PyResult { - self.0.targets.to_pyo3_wrapper(py) + self.0.targets.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Assign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAssign(pub &'static crate::StmtAssign); +pub struct StmtAssign(pub &'static ast::StmtAssign); -impl From<&'static crate::StmtAssign> for StmtAssign { - fn from(node: &'static crate::StmtAssign) -> Self { +impl From<&'static ast::StmtAssign> for StmtAssign { + fn from(node: &'static ast::StmtAssign) -> Self { StmtAssign(node) } } impl ToPyObject for StmtAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAssign { +impl ToPyWrapper for ast::StmtAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAssign(self).to_object(py)) } } @@ -537,44 +537,44 @@ impl StmtAssign { #[getter] #[inline] fn get_targets(&self, py: Python) -> PyResult { - self.0.targets.to_pyo3_wrapper(py) + self.0.targets.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_AugAssign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAugAssign(pub &'static crate::StmtAugAssign); +pub struct StmtAugAssign(pub &'static ast::StmtAugAssign); -impl From<&'static crate::StmtAugAssign> for StmtAugAssign { - fn from(node: &'static crate::StmtAugAssign) -> Self { +impl From<&'static ast::StmtAugAssign> for StmtAugAssign { + fn from(node: &'static ast::StmtAugAssign) -> Self { StmtAugAssign(node) } } impl ToPyObject for StmtAugAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAugAssign { +impl ToPyWrapper for ast::StmtAugAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAugAssign(self).to_object(py)) } } @@ -584,44 +584,44 @@ impl StmtAugAssign { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_AnnAssign", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAnnAssign(pub &'static crate::StmtAnnAssign); +pub struct StmtAnnAssign(pub &'static ast::StmtAnnAssign); -impl From<&'static crate::StmtAnnAssign> for StmtAnnAssign { - fn from(node: &'static crate::StmtAnnAssign) -> Self { +impl From<&'static ast::StmtAnnAssign> for StmtAnnAssign { + fn from(node: &'static ast::StmtAnnAssign) -> Self { StmtAnnAssign(node) } } impl ToPyObject for StmtAnnAssign { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAnnAssign { +impl ToPyWrapper for ast::StmtAnnAssign { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAnnAssign(self).to_object(py)) } } @@ -631,50 +631,50 @@ impl StmtAnnAssign { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_annotation(&self, py: Python) -> PyResult { - self.0.annotation.to_pyo3_wrapper(py) + self.0.annotation.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_simple(&self, py: Python) -> PyResult { - self.0.simple.to_pyo3_wrapper(py) + self.0.simple.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_For", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtFor(pub &'static crate::StmtFor); +pub struct StmtFor(pub &'static ast::StmtFor); -impl From<&'static crate::StmtFor> for StmtFor { - fn from(node: &'static crate::StmtFor) -> Self { +impl From<&'static ast::StmtFor> for StmtFor { + fn from(node: &'static ast::StmtFor) -> Self { StmtFor(node) } } impl ToPyObject for StmtFor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtFor { +impl ToPyWrapper for ast::StmtFor { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtFor(self).to_object(py)) } } @@ -684,56 +684,56 @@ impl StmtFor { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_AsyncFor", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncFor(pub &'static crate::StmtAsyncFor); +pub struct StmtAsyncFor(pub &'static ast::StmtAsyncFor); -impl From<&'static crate::StmtAsyncFor> for StmtAsyncFor { - fn from(node: &'static crate::StmtAsyncFor) -> Self { +impl From<&'static ast::StmtAsyncFor> for StmtAsyncFor { + fn from(node: &'static ast::StmtAsyncFor) -> Self { StmtAsyncFor(node) } } impl ToPyObject for StmtAsyncFor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncFor { +impl ToPyWrapper for ast::StmtAsyncFor { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncFor(self).to_object(py)) } } @@ -743,56 +743,56 @@ impl StmtAsyncFor { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_While", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtWhile(pub &'static crate::StmtWhile); +pub struct StmtWhile(pub &'static ast::StmtWhile); -impl From<&'static crate::StmtWhile> for StmtWhile { - fn from(node: &'static crate::StmtWhile) -> Self { +impl From<&'static ast::StmtWhile> for StmtWhile { + fn from(node: &'static ast::StmtWhile) -> Self { StmtWhile(node) } } impl ToPyObject for StmtWhile { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtWhile { +impl ToPyWrapper for ast::StmtWhile { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtWhile(self).to_object(py)) } } @@ -802,44 +802,44 @@ impl StmtWhile { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_If", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtIf(pub &'static crate::StmtIf); +pub struct StmtIf(pub &'static ast::StmtIf); -impl From<&'static crate::StmtIf> for StmtIf { - fn from(node: &'static crate::StmtIf) -> Self { +impl From<&'static ast::StmtIf> for StmtIf { + fn from(node: &'static ast::StmtIf) -> Self { StmtIf(node) } } impl ToPyObject for StmtIf { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtIf { +impl ToPyWrapper for ast::StmtIf { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtIf(self).to_object(py)) } } @@ -849,44 +849,44 @@ impl StmtIf { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_With", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtWith(pub &'static crate::StmtWith); +pub struct StmtWith(pub &'static ast::StmtWith); -impl From<&'static crate::StmtWith> for StmtWith { - fn from(node: &'static crate::StmtWith) -> Self { +impl From<&'static ast::StmtWith> for StmtWith { + fn from(node: &'static ast::StmtWith) -> Self { StmtWith(node) } } impl ToPyObject for StmtWith { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtWith { +impl ToPyWrapper for ast::StmtWith { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtWith(self).to_object(py)) } } @@ -896,44 +896,44 @@ impl StmtWith { #[getter] #[inline] fn get_items(&self, py: Python) -> PyResult { - self.0.items.to_pyo3_wrapper(py) + self.0.items.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_AsyncWith", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAsyncWith(pub &'static crate::StmtAsyncWith); +pub struct StmtAsyncWith(pub &'static ast::StmtAsyncWith); -impl From<&'static crate::StmtAsyncWith> for StmtAsyncWith { - fn from(node: &'static crate::StmtAsyncWith) -> Self { +impl From<&'static ast::StmtAsyncWith> for StmtAsyncWith { + fn from(node: &'static ast::StmtAsyncWith) -> Self { StmtAsyncWith(node) } } impl ToPyObject for StmtAsyncWith { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAsyncWith { +impl ToPyWrapper for ast::StmtAsyncWith { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAsyncWith(self).to_object(py)) } } @@ -943,44 +943,44 @@ impl StmtAsyncWith { #[getter] #[inline] fn get_items(&self, py: Python) -> PyResult { - self.0.items.to_pyo3_wrapper(py) + self.0.items.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Match", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtMatch(pub &'static crate::StmtMatch); +pub struct StmtMatch(pub &'static ast::StmtMatch); -impl From<&'static crate::StmtMatch> for StmtMatch { - fn from(node: &'static crate::StmtMatch) -> Self { +impl From<&'static ast::StmtMatch> for StmtMatch { + fn from(node: &'static ast::StmtMatch) -> Self { StmtMatch(node) } } impl ToPyObject for StmtMatch { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtMatch { +impl ToPyWrapper for ast::StmtMatch { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtMatch(self).to_object(py)) } } @@ -990,38 +990,38 @@ impl StmtMatch { #[getter] #[inline] fn get_subject(&self, py: Python) -> PyResult { - self.0.subject.to_pyo3_wrapper(py) + self.0.subject.to_py_wrapper(py) } #[getter] #[inline] fn get_cases(&self, py: Python) -> PyResult { - self.0.cases.to_pyo3_wrapper(py) + self.0.cases.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Raise", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtRaise(pub &'static crate::StmtRaise); +pub struct StmtRaise(pub &'static ast::StmtRaise); -impl From<&'static crate::StmtRaise> for StmtRaise { - fn from(node: &'static crate::StmtRaise) -> Self { +impl From<&'static ast::StmtRaise> for StmtRaise { + fn from(node: &'static ast::StmtRaise) -> Self { StmtRaise(node) } } impl ToPyObject for StmtRaise { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtRaise { +impl ToPyWrapper for ast::StmtRaise { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtRaise(self).to_object(py)) } } @@ -1031,38 +1031,38 @@ impl StmtRaise { #[getter] #[inline] fn get_exc(&self, py: Python) -> PyResult { - self.0.exc.to_pyo3_wrapper(py) + self.0.exc.to_py_wrapper(py) } #[getter] #[inline] fn get_cause(&self, py: Python) -> PyResult { - self.0.cause.to_pyo3_wrapper(py) + self.0.cause.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Try", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtTry(pub &'static crate::StmtTry); +pub struct StmtTry(pub &'static ast::StmtTry); -impl From<&'static crate::StmtTry> for StmtTry { - fn from(node: &'static crate::StmtTry) -> Self { +impl From<&'static ast::StmtTry> for StmtTry { + fn from(node: &'static ast::StmtTry) -> Self { StmtTry(node) } } impl ToPyObject for StmtTry { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtTry { +impl ToPyWrapper for ast::StmtTry { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtTry(self).to_object(py)) } } @@ -1072,50 +1072,50 @@ impl StmtTry { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_handlers(&self, py: Python) -> PyResult { - self.0.handlers.to_pyo3_wrapper(py) + self.0.handlers.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_finalbody(&self, py: Python) -> PyResult { - self.0.finalbody.to_pyo3_wrapper(py) + self.0.finalbody.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_TryStar", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtTryStar(pub &'static crate::StmtTryStar); +pub struct StmtTryStar(pub &'static ast::StmtTryStar); -impl From<&'static crate::StmtTryStar> for StmtTryStar { - fn from(node: &'static crate::StmtTryStar) -> Self { +impl From<&'static ast::StmtTryStar> for StmtTryStar { + fn from(node: &'static ast::StmtTryStar) -> Self { StmtTryStar(node) } } impl ToPyObject for StmtTryStar { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtTryStar { +impl ToPyWrapper for ast::StmtTryStar { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtTryStar(self).to_object(py)) } } @@ -1125,50 +1125,50 @@ impl StmtTryStar { #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_handlers(&self, py: Python) -> PyResult { - self.0.handlers.to_pyo3_wrapper(py) + self.0.handlers.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } #[getter] #[inline] fn get_finalbody(&self, py: Python) -> PyResult { - self.0.finalbody.to_pyo3_wrapper(py) + self.0.finalbody.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Assert", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtAssert(pub &'static crate::StmtAssert); +pub struct StmtAssert(pub &'static ast::StmtAssert); -impl From<&'static crate::StmtAssert> for StmtAssert { - fn from(node: &'static crate::StmtAssert) -> Self { +impl From<&'static ast::StmtAssert> for StmtAssert { + fn from(node: &'static ast::StmtAssert) -> Self { StmtAssert(node) } } impl ToPyObject for StmtAssert { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtAssert { +impl ToPyWrapper for ast::StmtAssert { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtAssert(self).to_object(py)) } } @@ -1178,38 +1178,38 @@ impl StmtAssert { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_msg(&self, py: Python) -> PyResult { - self.0.msg.to_pyo3_wrapper(py) + self.0.msg.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Import", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtImport(pub &'static crate::StmtImport); +pub struct StmtImport(pub &'static ast::StmtImport); -impl From<&'static crate::StmtImport> for StmtImport { - fn from(node: &'static crate::StmtImport) -> Self { +impl From<&'static ast::StmtImport> for StmtImport { + fn from(node: &'static ast::StmtImport) -> Self { StmtImport(node) } } impl ToPyObject for StmtImport { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtImport { +impl ToPyWrapper for ast::StmtImport { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtImport(self).to_object(py)) } } @@ -1219,32 +1219,32 @@ impl StmtImport { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_ImportFrom", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtImportFrom(pub &'static crate::StmtImportFrom); +pub struct StmtImportFrom(pub &'static ast::StmtImportFrom); -impl From<&'static crate::StmtImportFrom> for StmtImportFrom { - fn from(node: &'static crate::StmtImportFrom) -> Self { +impl From<&'static ast::StmtImportFrom> for StmtImportFrom { + fn from(node: &'static ast::StmtImportFrom) -> Self { StmtImportFrom(node) } } impl ToPyObject for StmtImportFrom { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtImportFrom { +impl ToPyWrapper for ast::StmtImportFrom { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtImportFrom(self).to_object(py)) } } @@ -1254,44 +1254,44 @@ impl StmtImportFrom { #[getter] #[inline] fn get_module(&self, py: Python) -> PyResult { - self.0.module.to_pyo3_wrapper(py) + self.0.module.to_py_wrapper(py) } #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } #[getter] #[inline] fn get_level(&self, py: Python) -> PyResult { - self.0.level.to_pyo3_wrapper(py) + self.0.level.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Global", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtGlobal(pub &'static crate::StmtGlobal); +pub struct StmtGlobal(pub &'static ast::StmtGlobal); -impl From<&'static crate::StmtGlobal> for StmtGlobal { - fn from(node: &'static crate::StmtGlobal) -> Self { +impl From<&'static ast::StmtGlobal> for StmtGlobal { + fn from(node: &'static ast::StmtGlobal) -> Self { StmtGlobal(node) } } impl ToPyObject for StmtGlobal { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtGlobal { +impl ToPyWrapper for ast::StmtGlobal { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtGlobal(self).to_object(py)) } } @@ -1301,32 +1301,32 @@ impl StmtGlobal { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Nonlocal", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtNonlocal(pub &'static crate::StmtNonlocal); +pub struct StmtNonlocal(pub &'static ast::StmtNonlocal); -impl From<&'static crate::StmtNonlocal> for StmtNonlocal { - fn from(node: &'static crate::StmtNonlocal) -> Self { +impl From<&'static ast::StmtNonlocal> for StmtNonlocal { + fn from(node: &'static ast::StmtNonlocal) -> Self { StmtNonlocal(node) } } impl ToPyObject for StmtNonlocal { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtNonlocal { +impl ToPyWrapper for ast::StmtNonlocal { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtNonlocal(self).to_object(py)) } } @@ -1336,32 +1336,32 @@ impl StmtNonlocal { #[getter] #[inline] fn get_names(&self, py: Python) -> PyResult { - self.0.names.to_pyo3_wrapper(py) + self.0.names.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Expr", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtExpr(pub &'static crate::StmtExpr); +pub struct StmtExpr(pub &'static ast::StmtExpr); -impl From<&'static crate::StmtExpr> for StmtExpr { - fn from(node: &'static crate::StmtExpr) -> Self { +impl From<&'static ast::StmtExpr> for StmtExpr { + fn from(node: &'static ast::StmtExpr) -> Self { StmtExpr(node) } } impl ToPyObject for StmtExpr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtExpr { +impl ToPyWrapper for ast::StmtExpr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtExpr(self).to_object(py)) } } @@ -1371,32 +1371,32 @@ impl StmtExpr { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Pass", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtPass(pub &'static crate::StmtPass); +pub struct StmtPass(pub &'static ast::StmtPass); -impl From<&'static crate::StmtPass> for StmtPass { - fn from(node: &'static crate::StmtPass) -> Self { +impl From<&'static ast::StmtPass> for StmtPass { + fn from(node: &'static ast::StmtPass) -> Self { StmtPass(node) } } impl ToPyObject for StmtPass { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtPass { +impl ToPyWrapper for ast::StmtPass { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtPass(self).to_object(py)) } } @@ -1406,26 +1406,26 @@ impl StmtPass {} #[pyclass(module="rustpython_ast.ranged", name="_Break", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtBreak(pub &'static crate::StmtBreak); +pub struct StmtBreak(pub &'static ast::StmtBreak); -impl From<&'static crate::StmtBreak> for StmtBreak { - fn from(node: &'static crate::StmtBreak) -> Self { +impl From<&'static ast::StmtBreak> for StmtBreak { + fn from(node: &'static ast::StmtBreak) -> Self { StmtBreak(node) } } impl ToPyObject for StmtBreak { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtBreak { +impl ToPyWrapper for ast::StmtBreak { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtBreak(self).to_object(py)) } } @@ -1435,26 +1435,26 @@ impl StmtBreak {} #[pyclass(module="rustpython_ast.ranged", name="_Continue", extends=Stmt, frozen)] #[derive(Clone, Debug)] -pub struct StmtContinue(pub &'static crate::StmtContinue); +pub struct StmtContinue(pub &'static ast::StmtContinue); -impl From<&'static crate::StmtContinue> for StmtContinue { - fn from(node: &'static crate::StmtContinue) -> Self { +impl From<&'static ast::StmtContinue> for StmtContinue { + fn from(node: &'static ast::StmtContinue) -> Self { StmtContinue(node) } } impl ToPyObject for StmtContinue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Stmt) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::StmtContinue { +impl ToPyWrapper for ast::StmtContinue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(StmtContinue(self).to_object(py)) } } @@ -1462,12 +1462,12 @@ impl ToPyo3Wrapper for crate::StmtContinue { #[pymethods] impl StmtContinue {} -#[pyclass(module="rustpython_ast.ranged", name="_expr", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_expr", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Expr; -impl From<&'static crate::Expr> for Expr { - fn from(_node: &'static crate::Expr) -> Self { +impl From<&'static ast::Expr> for Expr { + fn from(_node: &'static ast::Expr) -> Self { Expr } } @@ -1476,7 +1476,7 @@ impl From<&'static crate::Expr> for Expr { impl Expr { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Expr { @@ -1486,63 +1486,63 @@ impl ToPyObject for Expr { } } -impl ToPyo3Wrapper for crate::Expr { +impl ToPyWrapper for ast::Expr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::BoolOp(cons) => cons.to_pyo3_wrapper(py), - Self::NamedExpr(cons) => cons.to_pyo3_wrapper(py), - Self::BinOp(cons) => cons.to_pyo3_wrapper(py), - Self::UnaryOp(cons) => cons.to_pyo3_wrapper(py), - Self::Lambda(cons) => cons.to_pyo3_wrapper(py), - Self::IfExp(cons) => cons.to_pyo3_wrapper(py), - Self::Dict(cons) => cons.to_pyo3_wrapper(py), - Self::Set(cons) => cons.to_pyo3_wrapper(py), - Self::ListComp(cons) => cons.to_pyo3_wrapper(py), - Self::SetComp(cons) => cons.to_pyo3_wrapper(py), - Self::DictComp(cons) => cons.to_pyo3_wrapper(py), - Self::GeneratorExp(cons) => cons.to_pyo3_wrapper(py), - Self::Await(cons) => cons.to_pyo3_wrapper(py), - Self::Yield(cons) => cons.to_pyo3_wrapper(py), - Self::YieldFrom(cons) => cons.to_pyo3_wrapper(py), - Self::Compare(cons) => cons.to_pyo3_wrapper(py), - Self::Call(cons) => cons.to_pyo3_wrapper(py), - Self::FormattedValue(cons) => cons.to_pyo3_wrapper(py), - Self::JoinedStr(cons) => cons.to_pyo3_wrapper(py), - Self::Constant(cons) => cons.to_pyo3_wrapper(py), - Self::Attribute(cons) => cons.to_pyo3_wrapper(py), - Self::Subscript(cons) => cons.to_pyo3_wrapper(py), - Self::Starred(cons) => cons.to_pyo3_wrapper(py), - Self::Name(cons) => cons.to_pyo3_wrapper(py), - Self::List(cons) => cons.to_pyo3_wrapper(py), - Self::Tuple(cons) => cons.to_pyo3_wrapper(py), - Self::Slice(cons) => cons.to_pyo3_wrapper(py), + Self::BoolOp(cons) => cons.to_py_wrapper(py), + Self::NamedExpr(cons) => cons.to_py_wrapper(py), + Self::BinOp(cons) => cons.to_py_wrapper(py), + Self::UnaryOp(cons) => cons.to_py_wrapper(py), + Self::Lambda(cons) => cons.to_py_wrapper(py), + Self::IfExp(cons) => cons.to_py_wrapper(py), + Self::Dict(cons) => cons.to_py_wrapper(py), + Self::Set(cons) => cons.to_py_wrapper(py), + Self::ListComp(cons) => cons.to_py_wrapper(py), + Self::SetComp(cons) => cons.to_py_wrapper(py), + Self::DictComp(cons) => cons.to_py_wrapper(py), + Self::GeneratorExp(cons) => cons.to_py_wrapper(py), + Self::Await(cons) => cons.to_py_wrapper(py), + Self::Yield(cons) => cons.to_py_wrapper(py), + Self::YieldFrom(cons) => cons.to_py_wrapper(py), + Self::Compare(cons) => cons.to_py_wrapper(py), + Self::Call(cons) => cons.to_py_wrapper(py), + Self::FormattedValue(cons) => cons.to_py_wrapper(py), + Self::JoinedStr(cons) => cons.to_py_wrapper(py), + Self::Constant(cons) => cons.to_py_wrapper(py), + Self::Attribute(cons) => cons.to_py_wrapper(py), + Self::Subscript(cons) => cons.to_py_wrapper(py), + Self::Starred(cons) => cons.to_py_wrapper(py), + Self::Name(cons) => cons.to_py_wrapper(py), + Self::List(cons) => cons.to_py_wrapper(py), + Self::Tuple(cons) => cons.to_py_wrapper(py), + Self::Slice(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_BoolOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprBoolOp(pub &'static crate::ExprBoolOp); +pub struct ExprBoolOp(pub &'static ast::ExprBoolOp); -impl From<&'static crate::ExprBoolOp> for ExprBoolOp { - fn from(node: &'static crate::ExprBoolOp) -> Self { +impl From<&'static ast::ExprBoolOp> for ExprBoolOp { + fn from(node: &'static ast::ExprBoolOp) -> Self { ExprBoolOp(node) } } impl ToPyObject for ExprBoolOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprBoolOp { +impl ToPyWrapper for ast::ExprBoolOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprBoolOp(self).to_object(py)) } } @@ -1552,38 +1552,38 @@ impl ExprBoolOp { #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_NamedExpr", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprNamedExpr(pub &'static crate::ExprNamedExpr); +pub struct ExprNamedExpr(pub &'static ast::ExprNamedExpr); -impl From<&'static crate::ExprNamedExpr> for ExprNamedExpr { - fn from(node: &'static crate::ExprNamedExpr) -> Self { +impl From<&'static ast::ExprNamedExpr> for ExprNamedExpr { + fn from(node: &'static ast::ExprNamedExpr) -> Self { ExprNamedExpr(node) } } impl ToPyObject for ExprNamedExpr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprNamedExpr { +impl ToPyWrapper for ast::ExprNamedExpr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprNamedExpr(self).to_object(py)) } } @@ -1593,38 +1593,38 @@ impl ExprNamedExpr { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_BinOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprBinOp(pub &'static crate::ExprBinOp); +pub struct ExprBinOp(pub &'static ast::ExprBinOp); -impl From<&'static crate::ExprBinOp> for ExprBinOp { - fn from(node: &'static crate::ExprBinOp) -> Self { +impl From<&'static ast::ExprBinOp> for ExprBinOp { + fn from(node: &'static ast::ExprBinOp) -> Self { ExprBinOp(node) } } impl ToPyObject for ExprBinOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprBinOp { +impl ToPyWrapper for ast::ExprBinOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprBinOp(self).to_object(py)) } } @@ -1634,44 +1634,44 @@ impl ExprBinOp { #[getter] #[inline] fn get_left(&self, py: Python) -> PyResult { - self.0.left.to_pyo3_wrapper(py) + self.0.left.to_py_wrapper(py) } #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_right(&self, py: Python) -> PyResult { - self.0.right.to_pyo3_wrapper(py) + self.0.right.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_UnaryOp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprUnaryOp(pub &'static crate::ExprUnaryOp); +pub struct ExprUnaryOp(pub &'static ast::ExprUnaryOp); -impl From<&'static crate::ExprUnaryOp> for ExprUnaryOp { - fn from(node: &'static crate::ExprUnaryOp) -> Self { +impl From<&'static ast::ExprUnaryOp> for ExprUnaryOp { + fn from(node: &'static ast::ExprUnaryOp) -> Self { ExprUnaryOp(node) } } impl ToPyObject for ExprUnaryOp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprUnaryOp { +impl ToPyWrapper for ast::ExprUnaryOp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprUnaryOp(self).to_object(py)) } } @@ -1681,38 +1681,38 @@ impl ExprUnaryOp { #[getter] #[inline] fn get_op(&self, py: Python) -> PyResult { - self.0.op.to_pyo3_wrapper(py) + self.0.op.to_py_wrapper(py) } #[getter] #[inline] fn get_operand(&self, py: Python) -> PyResult { - self.0.operand.to_pyo3_wrapper(py) + self.0.operand.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Lambda", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprLambda(pub &'static crate::ExprLambda); +pub struct ExprLambda(pub &'static ast::ExprLambda); -impl From<&'static crate::ExprLambda> for ExprLambda { - fn from(node: &'static crate::ExprLambda) -> Self { +impl From<&'static ast::ExprLambda> for ExprLambda { + fn from(node: &'static ast::ExprLambda) -> Self { ExprLambda(node) } } impl ToPyObject for ExprLambda { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprLambda { +impl ToPyWrapper for ast::ExprLambda { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprLambda(self).to_object(py)) } } @@ -1722,38 +1722,38 @@ impl ExprLambda { #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_IfExp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprIfExp(pub &'static crate::ExprIfExp); +pub struct ExprIfExp(pub &'static ast::ExprIfExp); -impl From<&'static crate::ExprIfExp> for ExprIfExp { - fn from(node: &'static crate::ExprIfExp) -> Self { +impl From<&'static ast::ExprIfExp> for ExprIfExp { + fn from(node: &'static ast::ExprIfExp) -> Self { ExprIfExp(node) } } impl ToPyObject for ExprIfExp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprIfExp { +impl ToPyWrapper for ast::ExprIfExp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprIfExp(self).to_object(py)) } } @@ -1763,44 +1763,44 @@ impl ExprIfExp { #[getter] #[inline] fn get_test(&self, py: Python) -> PyResult { - self.0.test.to_pyo3_wrapper(py) + self.0.test.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } #[getter] #[inline] fn get_orelse(&self, py: Python) -> PyResult { - self.0.orelse.to_pyo3_wrapper(py) + self.0.orelse.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Dict", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprDict(pub &'static crate::ExprDict); +pub struct ExprDict(pub &'static ast::ExprDict); -impl From<&'static crate::ExprDict> for ExprDict { - fn from(node: &'static crate::ExprDict) -> Self { +impl From<&'static ast::ExprDict> for ExprDict { + fn from(node: &'static ast::ExprDict) -> Self { ExprDict(node) } } impl ToPyObject for ExprDict { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprDict { +impl ToPyWrapper for ast::ExprDict { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprDict(self).to_object(py)) } } @@ -1810,38 +1810,38 @@ impl ExprDict { #[getter] #[inline] fn get_keys(&self, py: Python) -> PyResult { - self.0.keys.to_pyo3_wrapper(py) + self.0.keys.to_py_wrapper(py) } #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Set", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSet(pub &'static crate::ExprSet); +pub struct ExprSet(pub &'static ast::ExprSet); -impl From<&'static crate::ExprSet> for ExprSet { - fn from(node: &'static crate::ExprSet) -> Self { +impl From<&'static ast::ExprSet> for ExprSet { + fn from(node: &'static ast::ExprSet) -> Self { ExprSet(node) } } impl ToPyObject for ExprSet { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSet { +impl ToPyWrapper for ast::ExprSet { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSet(self).to_object(py)) } } @@ -1851,32 +1851,32 @@ impl ExprSet { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_ListComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprListComp(pub &'static crate::ExprListComp); +pub struct ExprListComp(pub &'static ast::ExprListComp); -impl From<&'static crate::ExprListComp> for ExprListComp { - fn from(node: &'static crate::ExprListComp) -> Self { +impl From<&'static ast::ExprListComp> for ExprListComp { + fn from(node: &'static ast::ExprListComp) -> Self { ExprListComp(node) } } impl ToPyObject for ExprListComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprListComp { +impl ToPyWrapper for ast::ExprListComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprListComp(self).to_object(py)) } } @@ -1886,38 +1886,38 @@ impl ExprListComp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_SetComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSetComp(pub &'static crate::ExprSetComp); +pub struct ExprSetComp(pub &'static ast::ExprSetComp); -impl From<&'static crate::ExprSetComp> for ExprSetComp { - fn from(node: &'static crate::ExprSetComp) -> Self { +impl From<&'static ast::ExprSetComp> for ExprSetComp { + fn from(node: &'static ast::ExprSetComp) -> Self { ExprSetComp(node) } } impl ToPyObject for ExprSetComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSetComp { +impl ToPyWrapper for ast::ExprSetComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSetComp(self).to_object(py)) } } @@ -1927,38 +1927,38 @@ impl ExprSetComp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_DictComp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprDictComp(pub &'static crate::ExprDictComp); +pub struct ExprDictComp(pub &'static ast::ExprDictComp); -impl From<&'static crate::ExprDictComp> for ExprDictComp { - fn from(node: &'static crate::ExprDictComp) -> Self { +impl From<&'static ast::ExprDictComp> for ExprDictComp { + fn from(node: &'static ast::ExprDictComp) -> Self { ExprDictComp(node) } } impl ToPyObject for ExprDictComp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprDictComp { +impl ToPyWrapper for ast::ExprDictComp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprDictComp(self).to_object(py)) } } @@ -1968,44 +1968,44 @@ impl ExprDictComp { #[getter] #[inline] fn get_key(&self, py: Python) -> PyResult { - self.0.key.to_pyo3_wrapper(py) + self.0.key.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_GeneratorExp", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprGeneratorExp(pub &'static crate::ExprGeneratorExp); +pub struct ExprGeneratorExp(pub &'static ast::ExprGeneratorExp); -impl From<&'static crate::ExprGeneratorExp> for ExprGeneratorExp { - fn from(node: &'static crate::ExprGeneratorExp) -> Self { +impl From<&'static ast::ExprGeneratorExp> for ExprGeneratorExp { + fn from(node: &'static ast::ExprGeneratorExp) -> Self { ExprGeneratorExp(node) } } impl ToPyObject for ExprGeneratorExp { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprGeneratorExp { +impl ToPyWrapper for ast::ExprGeneratorExp { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprGeneratorExp(self).to_object(py)) } } @@ -2015,38 +2015,38 @@ impl ExprGeneratorExp { #[getter] #[inline] fn get_elt(&self, py: Python) -> PyResult { - self.0.elt.to_pyo3_wrapper(py) + self.0.elt.to_py_wrapper(py) } #[getter] #[inline] fn get_generators(&self, py: Python) -> PyResult { - self.0.generators.to_pyo3_wrapper(py) + self.0.generators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Await", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprAwait(pub &'static crate::ExprAwait); +pub struct ExprAwait(pub &'static ast::ExprAwait); -impl From<&'static crate::ExprAwait> for ExprAwait { - fn from(node: &'static crate::ExprAwait) -> Self { +impl From<&'static ast::ExprAwait> for ExprAwait { + fn from(node: &'static ast::ExprAwait) -> Self { ExprAwait(node) } } impl ToPyObject for ExprAwait { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprAwait { +impl ToPyWrapper for ast::ExprAwait { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprAwait(self).to_object(py)) } } @@ -2056,32 +2056,32 @@ impl ExprAwait { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Yield", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprYield(pub &'static crate::ExprYield); +pub struct ExprYield(pub &'static ast::ExprYield); -impl From<&'static crate::ExprYield> for ExprYield { - fn from(node: &'static crate::ExprYield) -> Self { +impl From<&'static ast::ExprYield> for ExprYield { + fn from(node: &'static ast::ExprYield) -> Self { ExprYield(node) } } impl ToPyObject for ExprYield { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprYield { +impl ToPyWrapper for ast::ExprYield { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprYield(self).to_object(py)) } } @@ -2091,32 +2091,32 @@ impl ExprYield { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_YieldFrom", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprYieldFrom(pub &'static crate::ExprYieldFrom); +pub struct ExprYieldFrom(pub &'static ast::ExprYieldFrom); -impl From<&'static crate::ExprYieldFrom> for ExprYieldFrom { - fn from(node: &'static crate::ExprYieldFrom) -> Self { +impl From<&'static ast::ExprYieldFrom> for ExprYieldFrom { + fn from(node: &'static ast::ExprYieldFrom) -> Self { ExprYieldFrom(node) } } impl ToPyObject for ExprYieldFrom { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprYieldFrom { +impl ToPyWrapper for ast::ExprYieldFrom { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprYieldFrom(self).to_object(py)) } } @@ -2126,32 +2126,32 @@ impl ExprYieldFrom { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Compare", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprCompare(pub &'static crate::ExprCompare); +pub struct ExprCompare(pub &'static ast::ExprCompare); -impl From<&'static crate::ExprCompare> for ExprCompare { - fn from(node: &'static crate::ExprCompare) -> Self { +impl From<&'static ast::ExprCompare> for ExprCompare { + fn from(node: &'static ast::ExprCompare) -> Self { ExprCompare(node) } } impl ToPyObject for ExprCompare { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprCompare { +impl ToPyWrapper for ast::ExprCompare { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprCompare(self).to_object(py)) } } @@ -2161,44 +2161,44 @@ impl ExprCompare { #[getter] #[inline] fn get_left(&self, py: Python) -> PyResult { - self.0.left.to_pyo3_wrapper(py) + self.0.left.to_py_wrapper(py) } #[getter] #[inline] fn get_ops(&self, py: Python) -> PyResult { - self.0.ops.to_pyo3_wrapper(py) + self.0.ops.to_py_wrapper(py) } #[getter] #[inline] fn get_comparators(&self, py: Python) -> PyResult { - self.0.comparators.to_pyo3_wrapper(py) + self.0.comparators.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Call", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprCall(pub &'static crate::ExprCall); +pub struct ExprCall(pub &'static ast::ExprCall); -impl From<&'static crate::ExprCall> for ExprCall { - fn from(node: &'static crate::ExprCall) -> Self { +impl From<&'static ast::ExprCall> for ExprCall { + fn from(node: &'static ast::ExprCall) -> Self { ExprCall(node) } } impl ToPyObject for ExprCall { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprCall { +impl ToPyWrapper for ast::ExprCall { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprCall(self).to_object(py)) } } @@ -2208,44 +2208,44 @@ impl ExprCall { #[getter] #[inline] fn get_func(&self, py: Python) -> PyResult { - self.0.func.to_pyo3_wrapper(py) + self.0.func.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_keywords(&self, py: Python) -> PyResult { - self.0.keywords.to_pyo3_wrapper(py) + self.0.keywords.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_FormattedValue", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprFormattedValue(pub &'static crate::ExprFormattedValue); +pub struct ExprFormattedValue(pub &'static ast::ExprFormattedValue); -impl From<&'static crate::ExprFormattedValue> for ExprFormattedValue { - fn from(node: &'static crate::ExprFormattedValue) -> Self { +impl From<&'static ast::ExprFormattedValue> for ExprFormattedValue { + fn from(node: &'static ast::ExprFormattedValue) -> Self { ExprFormattedValue(node) } } impl ToPyObject for ExprFormattedValue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprFormattedValue { +impl ToPyWrapper for ast::ExprFormattedValue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprFormattedValue(self).to_object(py)) } } @@ -2255,44 +2255,44 @@ impl ExprFormattedValue { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_conversion(&self, py: Python) -> PyResult { - self.0.conversion.to_pyo3_wrapper(py) + self.0.conversion.to_py_wrapper(py) } #[getter] #[inline] fn get_format_spec(&self, py: Python) -> PyResult { - self.0.format_spec.to_pyo3_wrapper(py) + self.0.format_spec.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_JoinedStr", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprJoinedStr(pub &'static crate::ExprJoinedStr); +pub struct ExprJoinedStr(pub &'static ast::ExprJoinedStr); -impl From<&'static crate::ExprJoinedStr> for ExprJoinedStr { - fn from(node: &'static crate::ExprJoinedStr) -> Self { +impl From<&'static ast::ExprJoinedStr> for ExprJoinedStr { + fn from(node: &'static ast::ExprJoinedStr) -> Self { ExprJoinedStr(node) } } impl ToPyObject for ExprJoinedStr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprJoinedStr { +impl ToPyWrapper for ast::ExprJoinedStr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprJoinedStr(self).to_object(py)) } } @@ -2302,32 +2302,32 @@ impl ExprJoinedStr { #[getter] #[inline] fn get_values(&self, py: Python) -> PyResult { - self.0.values.to_pyo3_wrapper(py) + self.0.values.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Constant", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprConstant(pub &'static crate::ExprConstant); +pub struct ExprConstant(pub &'static ast::ExprConstant); -impl From<&'static crate::ExprConstant> for ExprConstant { - fn from(node: &'static crate::ExprConstant) -> Self { +impl From<&'static ast::ExprConstant> for ExprConstant { + fn from(node: &'static ast::ExprConstant) -> Self { ExprConstant(node) } } impl ToPyObject for ExprConstant { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprConstant { +impl ToPyWrapper for ast::ExprConstant { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprConstant(self).to_object(py)) } } @@ -2337,38 +2337,38 @@ impl ExprConstant { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_kind(&self, py: Python) -> PyResult { - self.0.kind.to_pyo3_wrapper(py) + self.0.kind.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Attribute", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprAttribute(pub &'static crate::ExprAttribute); +pub struct ExprAttribute(pub &'static ast::ExprAttribute); -impl From<&'static crate::ExprAttribute> for ExprAttribute { - fn from(node: &'static crate::ExprAttribute) -> Self { +impl From<&'static ast::ExprAttribute> for ExprAttribute { + fn from(node: &'static ast::ExprAttribute) -> Self { ExprAttribute(node) } } impl ToPyObject for ExprAttribute { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprAttribute { +impl ToPyWrapper for ast::ExprAttribute { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprAttribute(self).to_object(py)) } } @@ -2378,44 +2378,44 @@ impl ExprAttribute { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_attr(&self, py: Python) -> PyResult { - self.0.attr.to_pyo3_wrapper(py) + self.0.attr.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Subscript", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSubscript(pub &'static crate::ExprSubscript); +pub struct ExprSubscript(pub &'static ast::ExprSubscript); -impl From<&'static crate::ExprSubscript> for ExprSubscript { - fn from(node: &'static crate::ExprSubscript) -> Self { +impl From<&'static ast::ExprSubscript> for ExprSubscript { + fn from(node: &'static ast::ExprSubscript) -> Self { ExprSubscript(node) } } impl ToPyObject for ExprSubscript { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSubscript { +impl ToPyWrapper for ast::ExprSubscript { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSubscript(self).to_object(py)) } } @@ -2425,44 +2425,44 @@ impl ExprSubscript { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_slice(&self, py: Python) -> PyResult { - self.0.slice.to_pyo3_wrapper(py) + self.0.slice.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Starred", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprStarred(pub &'static crate::ExprStarred); +pub struct ExprStarred(pub &'static ast::ExprStarred); -impl From<&'static crate::ExprStarred> for ExprStarred { - fn from(node: &'static crate::ExprStarred) -> Self { +impl From<&'static ast::ExprStarred> for ExprStarred { + fn from(node: &'static ast::ExprStarred) -> Self { ExprStarred(node) } } impl ToPyObject for ExprStarred { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprStarred { +impl ToPyWrapper for ast::ExprStarred { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprStarred(self).to_object(py)) } } @@ -2472,38 +2472,38 @@ impl ExprStarred { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Name", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprName(pub &'static crate::ExprName); +pub struct ExprName(pub &'static ast::ExprName); -impl From<&'static crate::ExprName> for ExprName { - fn from(node: &'static crate::ExprName) -> Self { +impl From<&'static ast::ExprName> for ExprName { + fn from(node: &'static ast::ExprName) -> Self { ExprName(node) } } impl ToPyObject for ExprName { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprName { +impl ToPyWrapper for ast::ExprName { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprName(self).to_object(py)) } } @@ -2513,38 +2513,38 @@ impl ExprName { #[getter] #[inline] fn get_id(&self, py: Python) -> PyResult { - self.0.id.to_pyo3_wrapper(py) + self.0.id.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_List", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprList(pub &'static crate::ExprList); +pub struct ExprList(pub &'static ast::ExprList); -impl From<&'static crate::ExprList> for ExprList { - fn from(node: &'static crate::ExprList) -> Self { +impl From<&'static ast::ExprList> for ExprList { + fn from(node: &'static ast::ExprList) -> Self { ExprList(node) } } impl ToPyObject for ExprList { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprList { +impl ToPyWrapper for ast::ExprList { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprList(self).to_object(py)) } } @@ -2554,38 +2554,38 @@ impl ExprList { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Tuple", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprTuple(pub &'static crate::ExprTuple); +pub struct ExprTuple(pub &'static ast::ExprTuple); -impl From<&'static crate::ExprTuple> for ExprTuple { - fn from(node: &'static crate::ExprTuple) -> Self { +impl From<&'static ast::ExprTuple> for ExprTuple { + fn from(node: &'static ast::ExprTuple) -> Self { ExprTuple(node) } } impl ToPyObject for ExprTuple { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprTuple { +impl ToPyWrapper for ast::ExprTuple { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprTuple(self).to_object(py)) } } @@ -2595,38 +2595,38 @@ impl ExprTuple { #[getter] #[inline] fn get_elts(&self, py: Python) -> PyResult { - self.0.elts.to_pyo3_wrapper(py) + self.0.elts.to_py_wrapper(py) } #[getter] #[inline] fn get_ctx(&self, py: Python) -> PyResult { - self.0.ctx.to_pyo3_wrapper(py) + self.0.ctx.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_Slice", extends=Expr, frozen)] #[derive(Clone, Debug)] -pub struct ExprSlice(pub &'static crate::ExprSlice); +pub struct ExprSlice(pub &'static ast::ExprSlice); -impl From<&'static crate::ExprSlice> for ExprSlice { - fn from(node: &'static crate::ExprSlice) -> Self { +impl From<&'static ast::ExprSlice> for ExprSlice { + fn from(node: &'static ast::ExprSlice) -> Self { ExprSlice(node) } } impl ToPyObject for ExprSlice { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Expr) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExprSlice { +impl ToPyWrapper for ast::ExprSlice { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExprSlice(self).to_object(py)) } } @@ -2636,28 +2636,28 @@ impl ExprSlice { #[getter] #[inline] fn get_lower(&self, py: Python) -> PyResult { - self.0.lower.to_pyo3_wrapper(py) + self.0.lower.to_py_wrapper(py) } #[getter] #[inline] fn get_upper(&self, py: Python) -> PyResult { - self.0.upper.to_pyo3_wrapper(py) + self.0.upper.to_py_wrapper(py) } #[getter] #[inline] fn get_step(&self, py: Python) -> PyResult { - self.0.step.to_pyo3_wrapper(py) + self.0.step.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_expr_context", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_expr_context", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct ExprContext; -impl From<&'static crate::ExprContext> for ExprContext { - fn from(_node: &'static crate::ExprContext) -> Self { +impl From<&'static ast::ExprContext> for ExprContext { + fn from(_node: &'static ast::ExprContext) -> Self { ExprContext } } @@ -2666,7 +2666,7 @@ impl From<&'static crate::ExprContext> for ExprContext { impl ExprContext { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for ExprContext { @@ -2681,7 +2681,7 @@ pub struct ExprContextLoad; impl ToPyObject for ExprContextLoad { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2693,7 +2693,7 @@ pub struct ExprContextStore; impl ToPyObject for ExprContextStore { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2705,19 +2705,19 @@ pub struct ExprContextDel; impl ToPyObject for ExprContextDel { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(ExprContext) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_boolop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_boolop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Boolop; -impl From<&'static crate::Boolop> for Boolop { - fn from(_node: &'static crate::Boolop) -> Self { +impl From<&'static ast::Boolop> for Boolop { + fn from(_node: &'static ast::Boolop) -> Self { Boolop } } @@ -2726,7 +2726,7 @@ impl From<&'static crate::Boolop> for Boolop { impl Boolop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Boolop { @@ -2741,7 +2741,7 @@ pub struct BoolopAnd; impl ToPyObject for BoolopAnd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Boolop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2753,19 +2753,19 @@ pub struct BoolopOr; impl ToPyObject for BoolopOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Boolop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_operator", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_operator", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Operator; -impl From<&'static crate::Operator> for Operator { - fn from(_node: &'static crate::Operator) -> Self { +impl From<&'static ast::Operator> for Operator { + fn from(_node: &'static ast::Operator) -> Self { Operator } } @@ -2774,7 +2774,7 @@ impl From<&'static crate::Operator> for Operator { impl Operator { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Operator { @@ -2789,7 +2789,7 @@ pub struct OperatorAdd; impl ToPyObject for OperatorAdd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2801,7 +2801,7 @@ pub struct OperatorSub; impl ToPyObject for OperatorSub { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2813,7 +2813,7 @@ pub struct OperatorMult; impl ToPyObject for OperatorMult { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2825,7 +2825,7 @@ pub struct OperatorMatMult; impl ToPyObject for OperatorMatMult { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2837,7 +2837,7 @@ pub struct OperatorDiv; impl ToPyObject for OperatorDiv { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2849,7 +2849,7 @@ pub struct OperatorMod; impl ToPyObject for OperatorMod { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2861,7 +2861,7 @@ pub struct OperatorPow; impl ToPyObject for OperatorPow { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2873,7 +2873,7 @@ pub struct OperatorLShift; impl ToPyObject for OperatorLShift { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2885,7 +2885,7 @@ pub struct OperatorRShift; impl ToPyObject for OperatorRShift { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2897,7 +2897,7 @@ pub struct OperatorBitOr; impl ToPyObject for OperatorBitOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2909,7 +2909,7 @@ pub struct OperatorBitXor; impl ToPyObject for OperatorBitXor { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2921,7 +2921,7 @@ pub struct OperatorBitAnd; impl ToPyObject for OperatorBitAnd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2933,19 +2933,19 @@ pub struct OperatorFloorDiv; impl ToPyObject for OperatorFloorDiv { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Operator) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_unaryop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_unaryop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Unaryop; -impl From<&'static crate::Unaryop> for Unaryop { - fn from(_node: &'static crate::Unaryop) -> Self { +impl From<&'static ast::Unaryop> for Unaryop { + fn from(_node: &'static ast::Unaryop) -> Self { Unaryop } } @@ -2954,7 +2954,7 @@ impl From<&'static crate::Unaryop> for Unaryop { impl Unaryop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Unaryop { @@ -2969,7 +2969,7 @@ pub struct UnaryopInvert; impl ToPyObject for UnaryopInvert { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2981,7 +2981,7 @@ pub struct UnaryopNot; impl ToPyObject for UnaryopNot { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -2993,7 +2993,7 @@ pub struct UnaryopUAdd; impl ToPyObject for UnaryopUAdd { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3005,19 +3005,19 @@ pub struct UnaryopUSub; impl ToPyObject for UnaryopUSub { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Unaryop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_cmpop", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_cmpop", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Cmpop; -impl From<&'static crate::Cmpop> for Cmpop { - fn from(_node: &'static crate::Cmpop) -> Self { +impl From<&'static ast::Cmpop> for Cmpop { + fn from(_node: &'static ast::Cmpop) -> Self { Cmpop } } @@ -3026,7 +3026,7 @@ impl From<&'static crate::Cmpop> for Cmpop { impl Cmpop { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Cmpop { @@ -3041,7 +3041,7 @@ pub struct CmpopEq; impl ToPyObject for CmpopEq { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3053,7 +3053,7 @@ pub struct CmpopNotEq; impl ToPyObject for CmpopNotEq { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3065,7 +3065,7 @@ pub struct CmpopLt; impl ToPyObject for CmpopLt { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3077,7 +3077,7 @@ pub struct CmpopLtE; impl ToPyObject for CmpopLtE { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3089,7 +3089,7 @@ pub struct CmpopGt; impl ToPyObject for CmpopGt { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3101,7 +3101,7 @@ pub struct CmpopGtE; impl ToPyObject for CmpopGtE { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3113,7 +3113,7 @@ pub struct CmpopIs; impl ToPyObject for CmpopIs { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3125,7 +3125,7 @@ pub struct CmpopIsNot; impl ToPyObject for CmpopIsNot { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3137,7 +3137,7 @@ pub struct CmpopIn; impl ToPyObject for CmpopIn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -3149,33 +3149,33 @@ pub struct CmpopNotIn; impl ToPyObject for CmpopNotIn { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Cmpop) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_comprehension", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_comprehension", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Comprehension(pub &'static crate::Comprehension); +pub struct Comprehension(pub &'static ast::Comprehension); -impl From<&'static crate::Comprehension> for Comprehension { - fn from(node: &'static crate::Comprehension) -> Self { +impl From<&'static ast::Comprehension> for Comprehension { + fn from(node: &'static ast::Comprehension) -> Self { Comprehension(node) } } impl ToPyObject for Comprehension { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Comprehension { +impl ToPyWrapper for ast::Comprehension { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Comprehension(self).to_object(py)) } } @@ -3185,34 +3185,34 @@ impl Comprehension { #[getter] #[inline] fn get_target(&self, py: Python) -> PyResult { - self.0.target.to_pyo3_wrapper(py) + self.0.target.to_py_wrapper(py) } #[getter] #[inline] fn get_iter(&self, py: Python) -> PyResult { - self.0.iter.to_pyo3_wrapper(py) + self.0.iter.to_py_wrapper(py) } #[getter] #[inline] fn get_ifs(&self, py: Python) -> PyResult { - self.0.ifs.to_pyo3_wrapper(py) + self.0.ifs.to_py_wrapper(py) } #[getter] #[inline] fn get_is_async(&self, py: Python) -> PyResult { - self.0.is_async.to_pyo3_wrapper(py) + self.0.is_async.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_excepthandler", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_excepthandler", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Excepthandler; -impl From<&'static crate::Excepthandler> for Excepthandler { - fn from(_node: &'static crate::Excepthandler) -> Self { +impl From<&'static ast::Excepthandler> for Excepthandler { + fn from(_node: &'static ast::Excepthandler) -> Self { Excepthandler } } @@ -3221,7 +3221,7 @@ impl From<&'static crate::Excepthandler> for Excepthandler { impl Excepthandler { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Excepthandler { @@ -3231,37 +3231,37 @@ impl ToPyObject for Excepthandler { } } -impl ToPyo3Wrapper for crate::Excepthandler { +impl ToPyWrapper for ast::Excepthandler { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::ExceptHandler(cons) => cons.to_pyo3_wrapper(py), + Self::ExceptHandler(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_ExceptHandler", extends=Excepthandler, frozen)] #[derive(Clone, Debug)] -pub struct ExcepthandlerExceptHandler(pub &'static crate::ExcepthandlerExceptHandler); +pub struct ExcepthandlerExceptHandler(pub &'static ast::ExcepthandlerExceptHandler); -impl From<&'static crate::ExcepthandlerExceptHandler> for ExcepthandlerExceptHandler { - fn from(node: &'static crate::ExcepthandlerExceptHandler) -> Self { +impl From<&'static ast::ExcepthandlerExceptHandler> for ExcepthandlerExceptHandler { + fn from(node: &'static ast::ExcepthandlerExceptHandler) -> Self { ExcepthandlerExceptHandler(node) } } impl ToPyObject for ExcepthandlerExceptHandler { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Excepthandler) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::ExcepthandlerExceptHandler { +impl ToPyWrapper for ast::ExcepthandlerExceptHandler { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(ExcepthandlerExceptHandler(self).to_object(py)) } } @@ -3271,42 +3271,42 @@ impl ExcepthandlerExceptHandler { #[getter] #[inline] fn get_type(&self, py: Python) -> PyResult { - self.0.type_.to_pyo3_wrapper(py) + self.0.type_.to_py_wrapper(py) } #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_arguments", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_arguments", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Arguments(pub &'static crate::Arguments); +pub struct Arguments(pub &'static ast::Arguments); -impl From<&'static crate::Arguments> for Arguments { - fn from(node: &'static crate::Arguments) -> Self { +impl From<&'static ast::Arguments> for Arguments { + fn from(node: &'static ast::Arguments) -> Self { Arguments(node) } } impl ToPyObject for Arguments { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Arguments { +impl ToPyWrapper for ast::Arguments { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Arguments(self).to_object(py)) } } @@ -3316,66 +3316,66 @@ impl Arguments { #[getter] #[inline] fn get_posonlyargs(&self, py: Python) -> PyResult { - self.0.posonlyargs.to_pyo3_wrapper(py) + self.0.posonlyargs.to_py_wrapper(py) } #[getter] #[inline] fn get_args(&self, py: Python) -> PyResult { - self.0.args.to_pyo3_wrapper(py) + self.0.args.to_py_wrapper(py) } #[getter] #[inline] fn get_vararg(&self, py: Python) -> PyResult { - self.0.vararg.to_pyo3_wrapper(py) + self.0.vararg.to_py_wrapper(py) } #[getter] #[inline] fn get_kwonlyargs(&self, py: Python) -> PyResult { - self.0.kwonlyargs.to_pyo3_wrapper(py) + self.0.kwonlyargs.to_py_wrapper(py) } #[getter] #[inline] fn get_kw_defaults(&self, py: Python) -> PyResult { - self.0.kw_defaults.to_pyo3_wrapper(py) + self.0.kw_defaults.to_py_wrapper(py) } #[getter] #[inline] fn get_kwarg(&self, py: Python) -> PyResult { - self.0.kwarg.to_pyo3_wrapper(py) + self.0.kwarg.to_py_wrapper(py) } #[getter] #[inline] fn get_defaults(&self, py: Python) -> PyResult { - self.0.defaults.to_pyo3_wrapper(py) + self.0.defaults.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_arg", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_arg", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Arg(pub &'static crate::Arg); +pub struct Arg(pub &'static ast::Arg); -impl From<&'static crate::Arg> for Arg { - fn from(node: &'static crate::Arg) -> Self { +impl From<&'static ast::Arg> for Arg { + fn from(node: &'static ast::Arg) -> Self { Arg(node) } } impl ToPyObject for Arg { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Arg { +impl ToPyWrapper for ast::Arg { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Arg(self).to_object(py)) } } @@ -3385,42 +3385,42 @@ impl Arg { #[getter] #[inline] fn get_arg(&self, py: Python) -> PyResult { - self.0.arg.to_pyo3_wrapper(py) + self.0.arg.to_py_wrapper(py) } #[getter] #[inline] fn get_annotation(&self, py: Python) -> PyResult { - self.0.annotation.to_pyo3_wrapper(py) + self.0.annotation.to_py_wrapper(py) } #[getter] #[inline] fn get_type_comment(&self, py: Python) -> PyResult { - self.0.type_comment.to_pyo3_wrapper(py) + self.0.type_comment.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_keyword", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_keyword", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Keyword(pub &'static crate::Keyword); +pub struct Keyword(pub &'static ast::Keyword); -impl From<&'static crate::Keyword> for Keyword { - fn from(node: &'static crate::Keyword) -> Self { +impl From<&'static ast::Keyword> for Keyword { + fn from(node: &'static ast::Keyword) -> Self { Keyword(node) } } impl ToPyObject for Keyword { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Keyword { +impl ToPyWrapper for ast::Keyword { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Keyword(self).to_object(py)) } } @@ -3430,36 +3430,36 @@ impl Keyword { #[getter] #[inline] fn get_arg(&self, py: Python) -> PyResult { - self.0.arg.to_pyo3_wrapper(py) + self.0.arg.to_py_wrapper(py) } #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_alias", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_alias", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Alias(pub &'static crate::Alias); +pub struct Alias(pub &'static ast::Alias); -impl From<&'static crate::Alias> for Alias { - fn from(node: &'static crate::Alias) -> Self { +impl From<&'static ast::Alias> for Alias { + fn from(node: &'static ast::Alias) -> Self { Alias(node) } } impl ToPyObject for Alias { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Alias { +impl ToPyWrapper for ast::Alias { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Alias(self).to_object(py)) } } @@ -3469,36 +3469,36 @@ impl Alias { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } #[getter] #[inline] fn get_asname(&self, py: Python) -> PyResult { - self.0.asname.to_pyo3_wrapper(py) + self.0.asname.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_withitem", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_withitem", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct Withitem(pub &'static crate::Withitem); +pub struct Withitem(pub &'static ast::Withitem); -impl From<&'static crate::Withitem> for Withitem { - fn from(node: &'static crate::Withitem) -> Self { +impl From<&'static ast::Withitem> for Withitem { + fn from(node: &'static ast::Withitem) -> Self { Withitem(node) } } impl ToPyObject for Withitem { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::Withitem { +impl ToPyWrapper for ast::Withitem { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(Withitem(self).to_object(py)) } } @@ -3508,36 +3508,36 @@ impl Withitem { #[getter] #[inline] fn get_context_expr(&self, py: Python) -> PyResult { - self.0.context_expr.to_pyo3_wrapper(py) + self.0.context_expr.to_py_wrapper(py) } #[getter] #[inline] fn get_optional_vars(&self, py: Python) -> PyResult { - self.0.optional_vars.to_pyo3_wrapper(py) + self.0.optional_vars.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_match_case", extends=super::AST, frozen)] +#[pyclass(module="rustpython_ast.ranged", name="_match_case", extends=super::Ast, frozen)] #[derive(Clone, Debug)] -pub struct MatchCase(pub &'static crate::MatchCase); +pub struct MatchCase(pub &'static ast::MatchCase); -impl From<&'static crate::MatchCase> for MatchCase { - fn from(node: &'static crate::MatchCase) -> Self { +impl From<&'static ast::MatchCase> for MatchCase { + fn from(node: &'static ast::MatchCase) -> Self { MatchCase(node) } } impl ToPyObject for MatchCase { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST).add_subclass(self.clone()); + let initializer = PyClassInitializer::from(Ast).add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::MatchCase { +impl ToPyWrapper for ast::MatchCase { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(MatchCase(self).to_object(py)) } } @@ -3547,28 +3547,28 @@ impl MatchCase { #[getter] #[inline] fn get_pattern(&self, py: Python) -> PyResult { - self.0.pattern.to_pyo3_wrapper(py) + self.0.pattern.to_py_wrapper(py) } #[getter] #[inline] fn get_guard(&self, py: Python) -> PyResult { - self.0.guard.to_pyo3_wrapper(py) + self.0.guard.to_py_wrapper(py) } #[getter] #[inline] fn get_body(&self, py: Python) -> PyResult { - self.0.body.to_pyo3_wrapper(py) + self.0.body.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_pattern", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_pattern", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct Pattern; -impl From<&'static crate::Pattern> for Pattern { - fn from(_node: &'static crate::Pattern) -> Self { +impl From<&'static ast::Pattern> for Pattern { + fn from(_node: &'static ast::Pattern) -> Self { Pattern } } @@ -3577,7 +3577,7 @@ impl From<&'static crate::Pattern> for Pattern { impl Pattern { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for Pattern { @@ -3587,44 +3587,44 @@ impl ToPyObject for Pattern { } } -impl ToPyo3Wrapper for crate::Pattern { +impl ToPyWrapper for ast::Pattern { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::MatchValue(cons) => cons.to_pyo3_wrapper(py), - Self::MatchSingleton(cons) => cons.to_pyo3_wrapper(py), - Self::MatchSequence(cons) => cons.to_pyo3_wrapper(py), - Self::MatchMapping(cons) => cons.to_pyo3_wrapper(py), - Self::MatchClass(cons) => cons.to_pyo3_wrapper(py), - Self::MatchStar(cons) => cons.to_pyo3_wrapper(py), - Self::MatchAs(cons) => cons.to_pyo3_wrapper(py), - Self::MatchOr(cons) => cons.to_pyo3_wrapper(py), + Self::MatchValue(cons) => cons.to_py_wrapper(py), + Self::MatchSingleton(cons) => cons.to_py_wrapper(py), + Self::MatchSequence(cons) => cons.to_py_wrapper(py), + Self::MatchMapping(cons) => cons.to_py_wrapper(py), + Self::MatchClass(cons) => cons.to_py_wrapper(py), + Self::MatchStar(cons) => cons.to_py_wrapper(py), + Self::MatchAs(cons) => cons.to_py_wrapper(py), + Self::MatchOr(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_MatchValue", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchValue(pub &'static crate::PatternMatchValue); +pub struct PatternMatchValue(pub &'static ast::PatternMatchValue); -impl From<&'static crate::PatternMatchValue> for PatternMatchValue { - fn from(node: &'static crate::PatternMatchValue) -> Self { +impl From<&'static ast::PatternMatchValue> for PatternMatchValue { + fn from(node: &'static ast::PatternMatchValue) -> Self { PatternMatchValue(node) } } impl ToPyObject for PatternMatchValue { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchValue { +impl ToPyWrapper for ast::PatternMatchValue { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchValue(self).to_object(py)) } } @@ -3634,32 +3634,32 @@ impl PatternMatchValue { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchSingleton", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchSingleton(pub &'static crate::PatternMatchSingleton); +pub struct PatternMatchSingleton(pub &'static ast::PatternMatchSingleton); -impl From<&'static crate::PatternMatchSingleton> for PatternMatchSingleton { - fn from(node: &'static crate::PatternMatchSingleton) -> Self { +impl From<&'static ast::PatternMatchSingleton> for PatternMatchSingleton { + fn from(node: &'static ast::PatternMatchSingleton) -> Self { PatternMatchSingleton(node) } } impl ToPyObject for PatternMatchSingleton { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchSingleton { +impl ToPyWrapper for ast::PatternMatchSingleton { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchSingleton(self).to_object(py)) } } @@ -3669,32 +3669,32 @@ impl PatternMatchSingleton { #[getter] #[inline] fn get_value(&self, py: Python) -> PyResult { - self.0.value.to_pyo3_wrapper(py) + self.0.value.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchSequence", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchSequence(pub &'static crate::PatternMatchSequence); +pub struct PatternMatchSequence(pub &'static ast::PatternMatchSequence); -impl From<&'static crate::PatternMatchSequence> for PatternMatchSequence { - fn from(node: &'static crate::PatternMatchSequence) -> Self { +impl From<&'static ast::PatternMatchSequence> for PatternMatchSequence { + fn from(node: &'static ast::PatternMatchSequence) -> Self { PatternMatchSequence(node) } } impl ToPyObject for PatternMatchSequence { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchSequence { +impl ToPyWrapper for ast::PatternMatchSequence { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchSequence(self).to_object(py)) } } @@ -3704,32 +3704,32 @@ impl PatternMatchSequence { #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchMapping", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchMapping(pub &'static crate::PatternMatchMapping); +pub struct PatternMatchMapping(pub &'static ast::PatternMatchMapping); -impl From<&'static crate::PatternMatchMapping> for PatternMatchMapping { - fn from(node: &'static crate::PatternMatchMapping) -> Self { +impl From<&'static ast::PatternMatchMapping> for PatternMatchMapping { + fn from(node: &'static ast::PatternMatchMapping) -> Self { PatternMatchMapping(node) } } impl ToPyObject for PatternMatchMapping { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchMapping { +impl ToPyWrapper for ast::PatternMatchMapping { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchMapping(self).to_object(py)) } } @@ -3739,44 +3739,44 @@ impl PatternMatchMapping { #[getter] #[inline] fn get_keys(&self, py: Python) -> PyResult { - self.0.keys.to_pyo3_wrapper(py) + self.0.keys.to_py_wrapper(py) } #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } #[getter] #[inline] fn get_rest(&self, py: Python) -> PyResult { - self.0.rest.to_pyo3_wrapper(py) + self.0.rest.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchClass", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchClass(pub &'static crate::PatternMatchClass); +pub struct PatternMatchClass(pub &'static ast::PatternMatchClass); -impl From<&'static crate::PatternMatchClass> for PatternMatchClass { - fn from(node: &'static crate::PatternMatchClass) -> Self { +impl From<&'static ast::PatternMatchClass> for PatternMatchClass { + fn from(node: &'static ast::PatternMatchClass) -> Self { PatternMatchClass(node) } } impl ToPyObject for PatternMatchClass { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchClass { +impl ToPyWrapper for ast::PatternMatchClass { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchClass(self).to_object(py)) } } @@ -3786,50 +3786,50 @@ impl PatternMatchClass { #[getter] #[inline] fn get_cls(&self, py: Python) -> PyResult { - self.0.cls.to_pyo3_wrapper(py) + self.0.cls.to_py_wrapper(py) } #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } #[getter] #[inline] fn get_kwd_attrs(&self, py: Python) -> PyResult { - self.0.kwd_attrs.to_pyo3_wrapper(py) + self.0.kwd_attrs.to_py_wrapper(py) } #[getter] #[inline] fn get_kwd_patterns(&self, py: Python) -> PyResult { - self.0.kwd_patterns.to_pyo3_wrapper(py) + self.0.kwd_patterns.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchStar", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchStar(pub &'static crate::PatternMatchStar); +pub struct PatternMatchStar(pub &'static ast::PatternMatchStar); -impl From<&'static crate::PatternMatchStar> for PatternMatchStar { - fn from(node: &'static crate::PatternMatchStar) -> Self { +impl From<&'static ast::PatternMatchStar> for PatternMatchStar { + fn from(node: &'static ast::PatternMatchStar) -> Self { PatternMatchStar(node) } } impl ToPyObject for PatternMatchStar { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchStar { +impl ToPyWrapper for ast::PatternMatchStar { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchStar(self).to_object(py)) } } @@ -3839,32 +3839,32 @@ impl PatternMatchStar { #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchAs", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchAs(pub &'static crate::PatternMatchAs); +pub struct PatternMatchAs(pub &'static ast::PatternMatchAs); -impl From<&'static crate::PatternMatchAs> for PatternMatchAs { - fn from(node: &'static crate::PatternMatchAs) -> Self { +impl From<&'static ast::PatternMatchAs> for PatternMatchAs { + fn from(node: &'static ast::PatternMatchAs) -> Self { PatternMatchAs(node) } } impl ToPyObject for PatternMatchAs { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchAs { +impl ToPyWrapper for ast::PatternMatchAs { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchAs(self).to_object(py)) } } @@ -3874,38 +3874,38 @@ impl PatternMatchAs { #[getter] #[inline] fn get_pattern(&self, py: Python) -> PyResult { - self.0.pattern.to_pyo3_wrapper(py) + self.0.pattern.to_py_wrapper(py) } #[getter] #[inline] fn get_name(&self, py: Python) -> PyResult { - self.0.name.to_pyo3_wrapper(py) + self.0.name.to_py_wrapper(py) } } #[pyclass(module="rustpython_ast.ranged", name="_MatchOr", extends=Pattern, frozen)] #[derive(Clone, Debug)] -pub struct PatternMatchOr(pub &'static crate::PatternMatchOr); +pub struct PatternMatchOr(pub &'static ast::PatternMatchOr); -impl From<&'static crate::PatternMatchOr> for PatternMatchOr { - fn from(node: &'static crate::PatternMatchOr) -> Self { +impl From<&'static ast::PatternMatchOr> for PatternMatchOr { + fn from(node: &'static ast::PatternMatchOr) -> Self { PatternMatchOr(node) } } impl ToPyObject for PatternMatchOr { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(Pattern) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::PatternMatchOr { +impl ToPyWrapper for ast::PatternMatchOr { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(PatternMatchOr(self).to_object(py)) } } @@ -3915,16 +3915,16 @@ impl PatternMatchOr { #[getter] #[inline] fn get_patterns(&self, py: Python) -> PyResult { - self.0.patterns.to_pyo3_wrapper(py) + self.0.patterns.to_py_wrapper(py) } } -#[pyclass(module="rustpython_ast.ranged", name="_type_ignore", extends=super::AST, frozen, subclass)] +#[pyclass(module="rustpython_ast.ranged", name="_type_ignore", extends=super::Ast, frozen, subclass)] #[derive(Clone, Debug)] pub struct TypeIgnore; -impl From<&'static crate::TypeIgnore> for TypeIgnore { - fn from(_node: &'static crate::TypeIgnore) -> Self { +impl From<&'static ast::TypeIgnore> for TypeIgnore { + fn from(_node: &'static ast::TypeIgnore) -> Self { TypeIgnore } } @@ -3933,7 +3933,7 @@ impl From<&'static crate::TypeIgnore> for TypeIgnore { impl TypeIgnore { #[new] fn new() -> PyClassInitializer { - PyClassInitializer::from(AST).add_subclass(Self) + PyClassInitializer::from(Ast).add_subclass(Self) } } impl ToPyObject for TypeIgnore { @@ -3943,37 +3943,37 @@ impl ToPyObject for TypeIgnore { } } -impl ToPyo3Wrapper for crate::TypeIgnore { +impl ToPyWrapper for ast::TypeIgnore { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { match &self { - Self::TypeIgnore(cons) => cons.to_pyo3_wrapper(py), + Self::TypeIgnore(cons) => cons.to_py_wrapper(py), } } } #[pyclass(module="rustpython_ast.ranged", name="_TypeIgnore", extends=TypeIgnore, frozen)] #[derive(Clone, Debug)] -pub struct TypeIgnoreTypeIgnore(pub &'static crate::TypeIgnoreTypeIgnore); +pub struct TypeIgnoreTypeIgnore(pub &'static ast::TypeIgnoreTypeIgnore); -impl From<&'static crate::TypeIgnoreTypeIgnore> for TypeIgnoreTypeIgnore { - fn from(node: &'static crate::TypeIgnoreTypeIgnore) -> Self { +impl From<&'static ast::TypeIgnoreTypeIgnore> for TypeIgnoreTypeIgnore { + fn from(node: &'static ast::TypeIgnoreTypeIgnore) -> Self { TypeIgnoreTypeIgnore(node) } } impl ToPyObject for TypeIgnoreTypeIgnore { fn to_object(&self, py: Python) -> PyObject { - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass(TypeIgnore) .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) } } -impl ToPyo3Wrapper for crate::TypeIgnoreTypeIgnore { +impl ToPyWrapper for ast::TypeIgnoreTypeIgnore { #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { Ok(TypeIgnoreTypeIgnore(self).to_object(py)) } } @@ -3983,137 +3983,135 @@ impl TypeIgnoreTypeIgnore { #[getter] #[inline] fn get_lineno(&self, py: Python) -> PyResult { - self.0.lineno.to_pyo3_wrapper(py) + self.0.lineno.to_py_wrapper(py) } #[getter] #[inline] fn get_tag(&self, py: Python) -> PyResult { - self.0.tag.to_pyo3_wrapper(py) + self.0.tag.to_py_wrapper(py) } } pub fn add_to_module(py: Python, m: &PyModule) -> PyResult<()> { super::init_module(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::( - py, m, - )?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; - super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; + super::init_type::(py, m)?; Ok(()) } diff --git a/ast-pyo3/src/lib.rs b/ast-pyo3/src/lib.rs new file mode 100644 index 0000000..ad26fa9 --- /dev/null +++ b/ast-pyo3/src/lib.rs @@ -0,0 +1,49 @@ +mod py_ast; +#[cfg(feature = "wrapper")] +pub mod wrapper; + +pub use py_ast::{init, PyNode, ToPyAst}; +use pyo3::prelude::*; +use rustpython_parser::ast::{source_code::SourceLocator, Fold}; + +#[pyfunction] +#[pyo3(signature = (source, filename="", *, type_comments=false, locate=true))] +pub fn parse<'py>( + source: &str, + filename: &str, + type_comments: bool, + locate: bool, + py: Python<'py>, +) -> PyResult<&'py PyAny> { + if type_comments { + todo!("'type_comments' is not implemented yet"); + } + let parsed = rustpython_parser::parse(source, rustpython_parser::Mode::Module, filename) + .map_err(|e| PyErr::new::(e.to_string()))?; + if locate { + let parsed = SourceLocator::new(source).fold(parsed).unwrap(); + parsed.module().unwrap().to_py_ast(py) + } else { + parsed.module().unwrap().to_py_ast(py) + } +} + +#[pymodule] +fn rustpython_ast(py: Python, m: &PyModule) -> PyResult<()> { + py_ast::init(py)?; + + #[cfg(feature = "wrapper")] + { + let ast = PyModule::new(py, "ast")?; + wrapper::located::add_to_module(py, ast)?; + m.add_submodule(ast)?; + + let ast = PyModule::new(py, "unlocated_ast")?; + wrapper::ranged::add_to_module(py, ast)?; + m.add_submodule(ast)?; + } + + m.add_function(wrap_pyfunction!(parse, m)?)?; + + Ok(()) +} diff --git a/ast-pyo3/src/py_ast.rs b/ast-pyo3/src/py_ast.rs new file mode 100644 index 0000000..5aa2dd3 --- /dev/null +++ b/ast-pyo3/src/py_ast.rs @@ -0,0 +1,203 @@ +use num_complex::Complex64; +use once_cell::sync::OnceCell; +use pyo3::{ + prelude::*, + types::{PyBool, PyBytes, PyList, PyString, PyTuple}, + ToPyObject, +}; +use rustpython_ast::{ + self as ast, source_code::SourceRange, text_size::TextRange, ConversionFlag, Node, +}; + +pub trait PyNode { + fn py_type_cache() -> &'static OnceCell<(Py, Py)> { + { + static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); + &PY_TYPE + } + } +} + +pub trait ToPyAst { + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny>; +} + +impl ToPyAst for Box { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + (**self).to_py_ast(py) + } +} + +impl ToPyAst for Option { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + match self { + Some(ast) => ast.to_py_ast(py), + None => Ok(ast_cache().none_ref(py)), + } + } +} + +impl ToPyAst for Vec { + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + let elts = self + .iter() + .map(|item| item.to_py_ast(py)) + .collect::, _>>()?; + let list = PyList::new(py, elts); + Ok(list.into()) + } +} + +impl ToPyAst for ast::Identifier { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + Ok(PyString::new(py, self.as_str()).into()) + } +} + +impl ToPyAst for ast::String { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + Ok(PyString::new(py, self.as_str()).into()) + } +} + +impl ToPyAst for bool { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + Ok(ast_cache().bool_int(py, *self)) + } +} + +impl ToPyAst for ConversionFlag { + #[inline] + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> { + Ok(ast_cache().conversion_flag(py, *self)) + } +} + +fn constant_to_object(constant: &ast::Constant, py: Python) -> PyObject { + let cache = ast_cache(); + match constant { + ast::Constant::None => cache.none.clone_ref(py), + ast::Constant::Bool(bool) => cache.bool(py, *bool).into(), + ast::Constant::Str(string) => string.to_object(py), + ast::Constant::Bytes(bytes) => PyBytes::new(py, bytes).into(), + ast::Constant::Int(int) => int.to_object(py), + ast::Constant::Tuple(elts) => { + let elts: Vec<_> = elts.iter().map(|c| constant_to_object(c, py)).collect(); + PyTuple::new(py, elts).into() + } + ast::Constant::Float(f64) => f64.to_object(py), + ast::Constant::Complex { real, imag } => Complex64::new(*real, *imag).to_object(py), + ast::Constant::Ellipsis => py.Ellipsis(), + } +} + +#[pyclass(module = "rustpython_ast", subclass)] +pub struct Ast; + +#[pymethods] +impl Ast { + #[new] + fn new() -> Self { + Self + } +} + +fn cache_py_type(ast_module: &PyAny) -> PyResult<()> { + let class = ast_module.getattr(N::NAME)?; + let base = if std::mem::size_of::() == 0 { + class.call0()? + } else { + class.getattr("__new__")? + }; + N::py_type_cache().get_or_init(|| (class.into(), base.into())); + Ok(()) +} + +// TODO: This cache must be bound to 'py +struct AstCache { + lineno: Py, + col_offset: Py, + end_lineno: Py, + end_col_offset: Py, + none: Py, + bool_values: (Py, Py), + bool_int_values: (Py, Py), + conversion_flags: (Py, Py, Py, Py), +} + +impl AstCache { + // fn location_vec<'py>(&'static self, py: Python<'py>, range: &SourceRange) -> &'py PyDict { + // let attributes = PyDict::new(py); + // attributes.set_item(self.lineno.as_ref(py), range.start.row.get()).unwrap(); + // attributes.set_item(self.col_offset.as_ref(py), range.start.column.to_zero_indexed()).unwrap(); + // if let Some(end) = range.end { + // attributes.set_item(self.end_lineno.as_ref(py), end.row.get()).unwrap(); + // attributes.set_item( + // self.end_col_offset.as_ref(py), + // end.column.to_zero_indexed(), + // ).unwrap(); + // } + // attributes + // } + #[inline] + fn none_ref<'py>(&'static self, py: Python<'py>) -> &'py PyAny { + Py::::as_ref(&self.none, py) + } + #[inline] + fn bool_int<'py>(&'static self, py: Python<'py>, value: bool) -> &'py PyAny { + let v = &self.bool_int_values; + Py::::as_ref(if value { &v.1 } else { &v.0 }, py) + } + #[inline] + fn bool(&'static self, py: Python, value: bool) -> Py { + let v = &self.bool_values; + (if value { &v.1 } else { &v.0 }).clone_ref(py) + } + fn conversion_flag<'py>(&'static self, py: Python<'py>, value: ConversionFlag) -> &'py PyAny { + let v = &self.conversion_flags; + match value { + ConversionFlag::None => v.0.as_ref(py), + ConversionFlag::Str => v.1.as_ref(py), + ConversionFlag::Ascii => v.2.as_ref(py), + ConversionFlag::Repr => v.3.as_ref(py), + } + } +} + +fn ast_cache_cell() -> &'static OnceCell { + { + static PY_TYPE: OnceCell = OnceCell::new(); + &PY_TYPE + } +} + +fn ast_cache() -> &'static AstCache { + ast_cache_cell().get().unwrap() +} + +pub fn init(py: Python) -> PyResult<()> { + ast_cache_cell().get_or_init(|| AstCache { + lineno: pyo3::intern!(py, "lineno").into_py(py), + col_offset: pyo3::intern!(py, "col_offset").into_py(py), + end_lineno: pyo3::intern!(py, "end_lineno").into_py(py), + end_col_offset: pyo3::intern!(py, "end_col_offset").into_py(py), + none: py.None(), + bool_values: (PyBool::new(py, false).into(), PyBool::new(py, true).into()), + bool_int_values: ((0).to_object(py), (1).to_object(py)), + conversion_flags: ( + (-1).to_object(py), + (b's').to_object(py), + (b'a').to_object(py), + (b'r').to_object(py), + ), + }); + + init_types(py) +} + +include!("gen/to_py_ast.rs"); diff --git a/ast-pyo3/src/wrapper.rs b/ast-pyo3/src/wrapper.rs new file mode 100644 index 0000000..38f2a00 --- /dev/null +++ b/ast-pyo3/src/wrapper.rs @@ -0,0 +1,141 @@ +use crate::PyNode; +use num_complex::Complex64; +use pyo3::prelude::*; +use pyo3::types::{PyBytes, PyList, PyTuple}; +use rustpython_ast::{ + self as ast, source_code::SourceRange, text_size::TextRange, ConversionFlag, Node, +}; + +pub trait ToPyWrapper { + fn to_py_wrapper(&'static self, py: Python) -> PyResult>; +} + +impl ToPyWrapper for Box { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + (**self).to_py_wrapper(py) + } +} + +impl ToPyWrapper for Option { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + match self { + Some(ast) => ast.to_py_wrapper(py), + None => Ok(py.None()), + } + } +} + +impl ToPyWrapper for ast::Identifier { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + Ok(self.as_str().to_object(py)) + } +} + +impl ToPyWrapper for ast::String { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + Ok(self.as_str().to_object(py)) + } +} + +impl ToPyWrapper for ast::Int { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + Ok((self.to_u32()).to_object(py)) + } +} + +impl ToPyWrapper for bool { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + Ok((*self as u32).to_object(py)) + } +} + +impl ToPyWrapper for ConversionFlag { + #[inline] + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + Ok((*self as i8).to_object(py)) + } +} + +impl ToPyWrapper for ast::Constant { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + let value = match self { + ast::Constant::None => py.None(), + ast::Constant::Bool(bool) => bool.to_object(py), + ast::Constant::Str(string) => string.to_object(py), + ast::Constant::Bytes(bytes) => PyBytes::new(py, bytes).into(), + ast::Constant::Int(int) => int.to_object(py), + ast::Constant::Tuple(elts) => { + let elts: PyResult> = elts.iter().map(|c| c.to_py_wrapper(py)).collect(); + PyTuple::new(py, elts?).into() + } + ast::Constant::Float(f64) => f64.to_object(py), + ast::Constant::Complex { real, imag } => Complex64::new(*real, *imag).to_object(py), + ast::Constant::Ellipsis => py.Ellipsis(), + }; + Ok(value) + } +} + +impl ToPyWrapper for Vec { + fn to_py_wrapper(&'static self, py: Python) -> PyResult> { + let list = PyList::empty(py); + for item in self { + let py_item = item.to_py_wrapper(py)?; + list.append(py_item)?; + } + Ok(list.into()) + } +} + +#[pyclass(module = "rustpython_ast", name = "AST", subclass)] +pub struct Ast; + +#[pymethods] +impl Ast { + #[new] + fn new() -> Self { + Self + } +} + +pub mod located { + pub use super::Ast; + use super::*; + include!("gen/wrapper_located.rs"); +} + +pub mod ranged { + pub use super::Ast; + use super::*; + include!("gen/wrapper_ranged.rs"); +} + +fn init_type(py: Python, m: &PyModule) -> PyResult<()> { + m.add_class::

()?; + let node = m.getattr(P::NAME)?; + if P::NAME != N::NAME { + // TODO: no idea how to escape rust keyword on #[pyclass] + m.setattr(P::NAME, node)?; + } + let names: Vec<&'static str> = N::FIELD_NAMES.to_vec(); + let fields = PyTuple::new(py, names); + node.setattr("_fields", fields)?; + Ok(()) +} + +/// A Python module implemented in Rust. +fn init_module(py: Python, m: &PyModule) -> PyResult<()> { + m.add_class::()?; + + let ast = m.getattr("AST")?; + let fields = PyTuple::empty(py); + ast.setattr("_fields", fields)?; + + Ok(()) +} diff --git a/ast-pyo3/test_ast.py b/ast-pyo3/test_ast.py new file mode 100644 index 0000000..e09d189 --- /dev/null +++ b/ast-pyo3/test_ast.py @@ -0,0 +1,56 @@ +import re +import difflib +import pytest + +import ast as py_ast +import rustpython_ast as rust_ast + + +from glob import glob + +files = {} +for path in glob("../../cpython/Lib/**/*.py"): + try: + txt = open(path, "r").read() + except UnicodeDecodeError: + continue + + # try: + # if py_ast.dump(py_ast.parse(txt)) != py_ast.dump(rust_ast.parse(txt)): + # continue + # except SyntaxError: + # continue + files[path] = txt + + +@pytest.mark.parametrize("path", files.keys()) +def test_roundtrip(path): + txt = files[path] + module_p = py_ast.parse(txt) + dump_p = py_ast.dump(module_p, indent=True) + module_r = rust_ast.parse(txt) + dump_r = py_ast.dump(module_r, indent=True) + p = re.compile("object at 0x[0-9a-f]+") + dump_p2 = re.sub(p, "object at 0x????????", dump_p) + dump_r2 = re.sub(p, "object at 0x????????", dump_r) + try: + assert dump_p2 == dump_r2 + except AssertionError: + last_sign = ' ' + for s in difflib.ndiff(dump_p2, dump_r2): + if s[0]==' ': continue + if s[0] == last_sign: + print(s[2:], end='') + else: + print() + print(s, end='') + last_sign = s[0] + # with open("dump_code.py", "w") as f: + # f.write(path) + # f.write('\n') + # f.write(txt) + # with open("dump_p.txt", "w") as f: + # f.write(dump_p2) + # with open("dump_r.txt", "w") as f: + # f.write(dump_r2) + raise diff --git a/ast/Cargo.toml b/ast/Cargo.toml index bee7c18..cedfa50 100644 --- a/ast/Cargo.toml +++ b/ast/Cargo.toml @@ -15,11 +15,6 @@ fold = [] unparse = ["rustpython-literal"] visitor = [] all-nodes-with-ranges = [] -pyo3 = ["dep:pyo3", "num-complex", "once_cell"] - -# This feature is experimental -# It reimplements AST types, but currently both slower than python AST types and limited to use in other API -pyo3-wrapper = ["pyo3"] [dependencies] rustpython-parser-core = { workspace = true } @@ -28,6 +23,5 @@ rustpython-literal = { workspace = true, optional = true } is-macro = { workspace = true } num-bigint = { workspace = true } static_assertions = "1.1.0" -num-complex = { workspace = true, optional = true } -once_cell = { workspace = true, optional = true } + pyo3 = { workspace = true, optional = true, features = ["num-bigint", "num-complex"] } diff --git a/ast/asdl_rs.py b/ast/asdl_rs.py index 7f0edd2..dca65ce 100755 --- a/ast/asdl_rs.py +++ b/ast/asdl_rs.py @@ -300,10 +300,13 @@ class StructVisitor(EmitVisitor): def visitModule(self, mod): self.emit_attrs(0) - self.emit(""" + self.emit( + """ #[derive(is_macro::Is)] pub enum Ast { - """, 0) + """, + 0, + ) for dfn in mod.dfns: rust_name = rust_type_name(dfn.name) generics = "" if self.type_info[dfn.name].is_simple else "" @@ -315,23 +318,29 @@ class StructVisitor(EmitVisitor): # "ast_" prefix to everywhere seems less useful. self.emit('#[is(name = "module")]', 1) self.emit(f"{rust_name}({rust_name}{generics}),", 1) - self.emit(""" - } - impl Node for Ast { - const NAME: &'static str = "AST"; - const FIELD_NAMES: &'static [&'static str] = &[]; - } - """, 0) + self.emit( + """ + } + impl Node for Ast { + const NAME: &'static str = "AST"; + const FIELD_NAMES: &'static [&'static str] = &[]; + } + """, + 0, + ) for dfn in mod.dfns: rust_name = rust_type_name(dfn.name) generics = "" if self.type_info[dfn.name].is_simple else "" - self.emit(f""" + self.emit( + f""" impl From<{rust_name}{generics}> for Ast {{ fn from(node: {rust_name}{generics}) -> Self {{ Ast::{rust_name}(node) }} }} - """, 0) + """, + 0, + ) for dfn in mod.dfns: self.visit(dfn) @@ -663,9 +672,7 @@ class FoldImplVisitor(EmitVisitor): cons_type_name = f"{enum_name}{cons.name}" - self.emit( - f"impl Foldable for {cons_type_name}{apply_t} {{", depth - ) + self.emit(f"impl Foldable for {cons_type_name}{apply_t} {{", depth) self.emit(f"type Mapped = {cons_type_name}{apply_u};", depth + 1) self.emit( "fn fold + ?Sized>(self, folder: &mut F) -> Result {", @@ -1071,11 +1078,6 @@ class ToPyo3AstVisitor(EmitVisitor): else: assert False, self.namespace - @property - def location(self): - # lineno, col_offset - pass - def visitModule(self, mod): for dfn in mod.dfns: self.visit(dfn) @@ -1095,16 +1097,16 @@ class ToPyo3AstVisitor(EmitVisitor): self.emit( f""" - impl ToPyo3Ast for crate::generic::{rust_name}{self.generics} {{ + impl ToPyAst for ast::{rust_name}{self.generics} {{ #[inline] - fn to_pyo3_ast(&self, {"_" if simple else ""}py: Python) -> PyResult> {{ + fn to_py_ast<'py>(&self, {"_" if simple else ""}py: Python<'py>) -> PyResult<&'py PyAny> {{ let instance = match &self {{ """, 0, ) for cons in sum.types: self.emit( - f"crate::{rust_name}::{cons.name}(cons) => cons.to_pyo3_ast(py)?,", + f"ast::{rust_name}::{cons.name}(cons) => cons.to_py_ast(py)?,", 1, ) self.emit( @@ -1126,12 +1128,13 @@ class ToPyo3AstVisitor(EmitVisitor): def emit_to_pyo3_with_fields(self, cons, type, name): type_info = self.type_info[type.name] + self.emit( f""" - impl ToPyo3Ast for crate::{name}{self.generics} {{ + impl ToPyAst for ast::{name}{self.generics} {{ #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> {{ - let cache = Self::py_type_cache().get().unwrap(); + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> {{ + let cache = Self::py_type_cache().get().unwrap(); """, 0, ) @@ -1144,12 +1147,34 @@ class ToPyo3AstVisitor(EmitVisitor): 1, ) self.emit( - "let instance = cache.0.call1(py, (", + """ + let instance = Py::::as_ref(&cache.0, py).call1(( + """, 1, ) for field in cons.fields: + if field.type == "constant": + self.emit( + f"constant_to_object({rust_field(field.name)}, py),", + 3, + ) + continue + if field.type == "int": + if field.name == "level": + assert field.opt + self.emit( + f"{rust_field(field.name)}.map_or_else(|| py.None(), |level| level.to_u32().to_object(py)),", + 3, + ) + continue + if field.name == "lineno": + self.emit( + f"{rust_field(field.name)}.to_u32().to_object(py),", + 3, + ) + continue self.emit( - f"{rust_field(field.name)}.to_pyo3_ast(py)?,", + f"{rust_field(field.name)}.to_py_ast(py)?,", 3, ) self.emit( @@ -1158,25 +1183,25 @@ class ToPyo3AstVisitor(EmitVisitor): ) else: self.emit( - "let instance = cache.0.call0(py)?;", + "let Self { range: _range } = self;", 1, ) self.emit( - "let Self { range: _range } = self;", + """let instance = Py::::as_ref(&cache.0, py).call0()?;""", 1, ) if type.value.attributes and self.namespace == "located": self.emit( """ - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; + let cache = ast_cache(); + instance.setattr(cache.lineno.as_ref(py), _range.start.row.get())?; + instance.setattr(cache.col_offset.as_ref(py), _range.start.column.get())?; if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; + instance.setattr(cache.end_lineno.as_ref(py), end.row.get())?; + instance.setattr(cache.end_col_offset.as_ref(py), end.column.get())?; } """, - 1, + 0, ) self.emit( """ @@ -1218,7 +1243,7 @@ class Pyo3StructVisitor(EmitVisitor): def ref(self): return "&" if self.borrow else "" - def emit_class(self, name, rust_name, simple, base="super::AST"): + def emit_class(self, name, rust_name, simple, base="super::Ast"): info = self.type_info[name] if simple: generics = "" @@ -1230,7 +1255,7 @@ class Pyo3StructVisitor(EmitVisitor): into = f"{rust_name}" else: subclass = "" - body = f"(pub {self.ref_def} crate::{rust_name}{generics})" + body = f"(pub {self.ref_def} ast::{rust_name}{generics})" into = f"{rust_name}(node)" self.emit( @@ -1239,8 +1264,8 @@ class Pyo3StructVisitor(EmitVisitor): #[derive(Clone, Debug)] pub struct {rust_name} {body}; - impl From<{self.ref_def} crate::{rust_name}{generics}> for {rust_name} {{ - fn from({"" if body else "_"}node: {self.ref_def} crate::{rust_name}{generics}) -> Self {{ + impl From<{self.ref_def} ast::{rust_name}{generics}> for {rust_name} {{ + fn from({"" if body else "_"}node: {self.ref_def} ast::{rust_name}{generics}) -> Self {{ {into} }} }} @@ -1254,7 +1279,7 @@ class Pyo3StructVisitor(EmitVisitor): impl {rust_name} {{ #[new] fn new() -> PyClassInitializer {{ - PyClassInitializer::from(AST) + PyClassInitializer::from(Ast) .add_subclass(Self) }} @@ -1269,7 +1294,7 @@ class Pyo3StructVisitor(EmitVisitor): 0, ) else: - if base != "super::AST": + if base != "super::Ast": add_subclass = f".add_subclass({base})" else: add_subclass = "" @@ -1277,7 +1302,7 @@ class Pyo3StructVisitor(EmitVisitor): f""" impl ToPyObject for {rust_name} {{ fn to_object(&self, py: Python) -> PyObject {{ - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) {add_subclass} .add_subclass(self.clone()); Py::new(py, initializer).unwrap().into_py(py) @@ -1305,7 +1330,7 @@ class Pyo3StructVisitor(EmitVisitor): #[getter] #[inline] fn get_{field.name}(&self, py: Python) -> PyResult {{ - self.0.{rust_field(field.name)}.to_pyo3_wrapper(py) + self.0.{rust_field(field.name)}.to_py_wrapper(py) }} """, 3, @@ -1331,7 +1356,7 @@ class Pyo3StructVisitor(EmitVisitor): for field in owner.fields: self.emit( - f'"{field.name}" => self.0.{rust_field(field.name)}.to_pyo3_wrapper(py)?,', + f'"{field.name}" => self.0.{rust_field(field.name)}.to_py_wrapper(py)?,', 3, ) @@ -1349,9 +1374,9 @@ class Pyo3StructVisitor(EmitVisitor): def emit_wrapper(self, rust_name): self.emit( f""" - impl ToPyo3Wrapper for crate::{rust_name}{self.generics} {{ + impl ToPyWrapper for ast::{rust_name}{self.generics} {{ #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> {{ + fn to_py_wrapper(&'static self, py: Python) -> PyResult> {{ Ok({rust_name}(self).to_object(py)) }} }} @@ -1375,16 +1400,16 @@ class Pyo3StructVisitor(EmitVisitor): if not simple: self.emit( f""" - impl ToPyo3Wrapper for crate::{rust_name}{self.generics} {{ + impl ToPyWrapper for ast::{rust_name}{self.generics} {{ #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> {{ + fn to_py_wrapper(&'static self, py: Python) -> PyResult> {{ match &self {{ """, 0, ) for cons in sum.types: - self.emit(f"Self::{cons.name}(cons) => cons.to_pyo3_wrapper(py),", 3) + self.emit(f"Self::{cons.name}(cons) => cons.to_py_wrapper(py),", 3) self.emit( """ @@ -1413,7 +1438,7 @@ class Pyo3StructVisitor(EmitVisitor): impl ToPyObject for {parent}{cons.name} {{ fn to_object(&self, py: Python) -> PyObject {{ - let initializer = PyClassInitializer::from(AST) + let initializer = PyClassInitializer::from(Ast) .add_subclass({parent}) .add_subclass(Self); Py::new(py, initializer).unwrap().into_py(py) @@ -1462,9 +1487,7 @@ class Pyo3PymoduleVisitor(EmitVisitor): self.emit_fields(cons.name, rust_name, simple) def emit_fields(self, name, rust_name, simple): - self.emit( - f"super::init_type::<{rust_name}, crate::generic::{rust_name}>(py, m)?;", 1 - ) + self.emit(f"super::init_type::<{rust_name}, ast::{rust_name}>(py, m)?;", 1) class StdlibClassDefVisitor(EmitVisitor): @@ -1812,7 +1835,7 @@ def write_pyo3_node(type_info, f): f.write( f""" - impl{generics} Pyo3Node for crate::generic::{rust_name}{generics} {{ + impl{generics} PyNode for ast::{rust_name}{generics} {{ #[inline] fn py_type_cache() -> &'static OnceCell<(Py, Py)> {{ static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); @@ -1842,7 +1865,7 @@ def write_to_pyo3(mod, type_info, f): for info in type_info.values(): rust_name = info.rust_sum_name - f.write(f"cache_py_type::(ast_module)?;\n") + f.write(f"cache_py_type::(ast_module)?;\n") f.write("Ok(())\n}") @@ -1856,20 +1879,20 @@ def write_to_pyo3_simple(type_info, f): rust_name = type_info.rust_sum_name f.write( f""" - impl ToPyo3Ast for crate::generic::{rust_name} {{ + impl ToPyAst for ast::{rust_name} {{ #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> {{ + fn to_py_ast<'py>(&self, py: Python<'py>) -> PyResult<&'py PyAny> {{ let cell = match &self {{ """, ) for cons in type_info.type.value.types: f.write( - f"""crate::{rust_name}::{cons.name} => crate::{rust_name}{cons.name}::py_type_cache(),""", + f"""ast::{rust_name}::{cons.name} => ast::{rust_name}{cons.name}::py_type_cache(),""", ) f.write( """ }; - Ok(cell.get().unwrap().1.clone()) + Ok(Py::::as_ref(&cell.get().unwrap().1, py)) } } """, @@ -1887,9 +1910,9 @@ def write_pyo3_wrapper(mod, type_info, namespace, f): rust_name = type_info.rust_sum_name f.write( f""" - impl ToPyo3Wrapper for crate::generic::{rust_name} {{ + impl ToPyWrapper for ast::{rust_name} {{ #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> {{ + fn to_py_wrapper(&self, py: Python) -> PyResult> {{ match &self {{ """, ) @@ -1908,9 +1931,9 @@ def write_pyo3_wrapper(mod, type_info, namespace, f): for cons in type_info.type.value.types: f.write( f""" - impl ToPyo3Wrapper for crate::generic::{rust_name}{cons.name} {{ + impl ToPyWrapper for ast::{rust_name}{cons.name} {{ #[inline] - fn to_pyo3_wrapper(&self, py: Python) -> PyResult> {{ + fn to_py_wrapper(&self, py: Python) -> PyResult> {{ Ok({rust_name}{cons.name}.to_object(py)) }} }} @@ -1949,6 +1972,7 @@ def write_ast_mod(mod, type_info, f): def main( input_filename, ast_dir, + ast_pyo3_dir, module_filename, dump_module=False, ): @@ -1971,14 +1995,20 @@ def main( ("ranged", p(write_ranged_def, mod, type_info)), ("located", p(write_located_def, mod, type_info)), ("visitor", p(write_visitor_def, mod, type_info)), - ("to_pyo3", p(write_to_pyo3, mod, type_info)), - ("pyo3_wrapper_located", p(write_pyo3_wrapper, mod, type_info, "located")), - ("pyo3_wrapper_ranged", p(write_pyo3_wrapper, mod, type_info, "ranged")), ]: with (ast_dir / f"{filename}.rs").open("w") as f: f.write(auto_gen_msg) write(f) + for filename, write in [ + ("to_py_ast", p(write_to_pyo3, mod, type_info)), + ("wrapper_located", p(write_pyo3_wrapper, mod, type_info, "located")), + ("wrapper_ranged", p(write_pyo3_wrapper, mod, type_info, "ranged")), + ]: + with (ast_pyo3_dir / f"{filename}.rs").open("w") as f: + f.write(auto_gen_msg) + write(f) + with module_filename.open("w") as module_file: module_file.write(auto_gen_msg) write_ast_mod(mod, type_info, module_file) @@ -1990,6 +2020,7 @@ if __name__ == "__main__": parser = ArgumentParser() parser.add_argument("input_file", type=Path) parser.add_argument("-A", "--ast-dir", type=Path, required=True) + parser.add_argument("-O", "--ast-pyo3-dir", type=Path, required=True) parser.add_argument("-M", "--module-file", type=Path, required=True) parser.add_argument("-d", "--dump-module", action="store_true") @@ -1997,6 +2028,7 @@ if __name__ == "__main__": main( args.input_file, args.ast_dir, + args.ast_pyo3_dir, args.module_file, args.dump_module, ) diff --git a/ast/src/gen/to_pyo3.rs b/ast/src/gen/to_pyo3.rs deleted file mode 100644 index c8a7478..0000000 --- a/ast/src/gen/to_pyo3.rs +++ /dev/null @@ -1,4937 +0,0 @@ -// File automatically generated by ast/asdl_rs.py. - -impl Pyo3Node for crate::generic::Mod { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ModModule { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ModInteractive { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ModExpression { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ModFunctionType { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Stmt { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtFunctionDef { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAsyncFunctionDef { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtClassDef { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtReturn { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtDelete { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAssign { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAugAssign { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAnnAssign { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtFor { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAsyncFor { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtWhile { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtIf { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtWith { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAsyncWith { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtMatch { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtRaise { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtTry { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtTryStar { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtAssert { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtImport { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtImportFrom { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtGlobal { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtNonlocal { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtExpr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtPass { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtBreak { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::StmtContinue { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Expr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprBoolOp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprNamedExpr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprBinOp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprUnaryOp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprLambda { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprIfExp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprDict { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprSet { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprListComp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprSetComp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprDictComp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprGeneratorExp { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprAwait { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprYield { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprYieldFrom { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprCompare { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprCall { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprFormattedValue { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprJoinedStr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprConstant { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprAttribute { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprSubscript { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprStarred { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprName { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprList { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprTuple { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprSlice { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprContext { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprContextLoad { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprContextStore { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExprContextDel { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Boolop { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::BoolopAnd { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::BoolopOr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Operator { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorAdd { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorSub { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorMult { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorMatMult { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorDiv { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorMod { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorPow { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorLShift { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorRShift { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorBitOr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorBitXor { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorBitAnd { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::OperatorFloorDiv { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Unaryop { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::UnaryopInvert { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::UnaryopNot { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::UnaryopUAdd { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::UnaryopUSub { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Cmpop { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopEq { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopNotEq { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopLt { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopLtE { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopGt { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopGtE { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopIs { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopIsNot { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopIn { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::CmpopNotIn { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Comprehension { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Excepthandler { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::ExcepthandlerExceptHandler { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Arguments { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Arg { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Keyword { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Alias { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Withitem { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::MatchCase { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::Pattern { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchValue { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchSingleton { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchSequence { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchMapping { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchClass { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchStar { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchAs { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::PatternMatchOr { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::TypeIgnore { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl Pyo3Node for crate::generic::TypeIgnoreTypeIgnore { - #[inline] - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } -} - -impl ToPyo3Ast for crate::generic::ExprContext { - #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> { - let cell = match &self { - crate::ExprContext::Load => crate::ExprContextLoad::py_type_cache(), - crate::ExprContext::Store => crate::ExprContextStore::py_type_cache(), - crate::ExprContext::Del => crate::ExprContextDel::py_type_cache(), - }; - Ok(cell.get().unwrap().1.clone()) - } -} - -impl ToPyo3Ast for crate::generic::Boolop { - #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> { - let cell = match &self { - crate::Boolop::And => crate::BoolopAnd::py_type_cache(), - crate::Boolop::Or => crate::BoolopOr::py_type_cache(), - }; - Ok(cell.get().unwrap().1.clone()) - } -} - -impl ToPyo3Ast for crate::generic::Operator { - #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> { - let cell = match &self { - crate::Operator::Add => crate::OperatorAdd::py_type_cache(), - crate::Operator::Sub => crate::OperatorSub::py_type_cache(), - crate::Operator::Mult => crate::OperatorMult::py_type_cache(), - crate::Operator::MatMult => crate::OperatorMatMult::py_type_cache(), - crate::Operator::Div => crate::OperatorDiv::py_type_cache(), - crate::Operator::Mod => crate::OperatorMod::py_type_cache(), - crate::Operator::Pow => crate::OperatorPow::py_type_cache(), - crate::Operator::LShift => crate::OperatorLShift::py_type_cache(), - crate::Operator::RShift => crate::OperatorRShift::py_type_cache(), - crate::Operator::BitOr => crate::OperatorBitOr::py_type_cache(), - crate::Operator::BitXor => crate::OperatorBitXor::py_type_cache(), - crate::Operator::BitAnd => crate::OperatorBitAnd::py_type_cache(), - crate::Operator::FloorDiv => crate::OperatorFloorDiv::py_type_cache(), - }; - Ok(cell.get().unwrap().1.clone()) - } -} - -impl ToPyo3Ast for crate::generic::Unaryop { - #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> { - let cell = match &self { - crate::Unaryop::Invert => crate::UnaryopInvert::py_type_cache(), - crate::Unaryop::Not => crate::UnaryopNot::py_type_cache(), - crate::Unaryop::UAdd => crate::UnaryopUAdd::py_type_cache(), - crate::Unaryop::USub => crate::UnaryopUSub::py_type_cache(), - }; - Ok(cell.get().unwrap().1.clone()) - } -} - -impl ToPyo3Ast for crate::generic::Cmpop { - #[inline] - fn to_pyo3_ast(&self, _py: Python) -> PyResult> { - let cell = match &self { - crate::Cmpop::Eq => crate::CmpopEq::py_type_cache(), - crate::Cmpop::NotEq => crate::CmpopNotEq::py_type_cache(), - crate::Cmpop::Lt => crate::CmpopLt::py_type_cache(), - crate::Cmpop::LtE => crate::CmpopLtE::py_type_cache(), - crate::Cmpop::Gt => crate::CmpopGt::py_type_cache(), - crate::Cmpop::GtE => crate::CmpopGtE::py_type_cache(), - crate::Cmpop::Is => crate::CmpopIs::py_type_cache(), - crate::Cmpop::IsNot => crate::CmpopIsNot::py_type_cache(), - crate::Cmpop::In => crate::CmpopIn::py_type_cache(), - crate::Cmpop::NotIn => crate::CmpopNotIn::py_type_cache(), - }; - Ok(cell.get().unwrap().1.clone()) - } -} - -impl ToPyo3Ast for crate::generic::Mod { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Mod::Module(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::Interactive(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::Expression(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::FunctionType(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModModule { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - type_ignores, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (body.to_pyo3_ast(py)?, type_ignores.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModInteractive { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - range: _range, - } = self; - let instance = cache.0.call1(py, (body.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModExpression { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - range: _range, - } = self; - let instance = cache.0.call1(py, (body.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModFunctionType { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - argtypes, - returns, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (argtypes.to_pyo3_ast(py)?, returns.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Stmt { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Stmt::FunctionDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncFunctionDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::ClassDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Return(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Delete(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Assign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AugAssign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AnnAssign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::For(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncFor(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::While(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::If(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::With(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncWith(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Match(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Raise(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Try(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::TryStar(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Assert(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Import(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::ImportFrom(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Global(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Nonlocal(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Expr(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Pass(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Break(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Continue(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtFunctionDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - args, - body, - decorator_list, - returns, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - returns.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncFunctionDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - args, - body, - decorator_list, - returns, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - returns.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtClassDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - bases, - keywords, - body, - decorator_list, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - bases.to_pyo3_ast(py)?, - keywords.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtReturn { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtDelete { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - targets, - range: _range, - } = self; - let instance = cache.0.call1(py, (targets.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - targets, - value, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - targets.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAugAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - op, - value, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - op.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAnnAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - annotation, - value, - simple, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - annotation.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - simple.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtFor { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - body, - orelse, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncFor { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - body, - orelse, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtWhile { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtIf { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtWith { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - items, - body, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - items.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncWith { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - items, - body, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - items.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtMatch { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - subject, - cases, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (subject.to_pyo3_ast(py)?, cases.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtRaise { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - exc, - cause, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (exc.to_pyo3_ast(py)?, cause.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtTry { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - handlers, - orelse, - finalbody, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - body.to_pyo3_ast(py)?, - handlers.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - finalbody.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtTryStar { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - handlers, - orelse, - finalbody, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - body.to_pyo3_ast(py)?, - handlers.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - finalbody.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAssert { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - msg, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (test.to_pyo3_ast(py)?, msg.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtImport { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtImportFrom { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - module, - names, - level, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - module.to_pyo3_ast(py)?, - names.to_pyo3_ast(py)?, - level.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtGlobal { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtNonlocal { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtExpr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtPass { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtBreak { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtContinue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Expr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Expr::BoolOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::NamedExpr(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::BinOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::UnaryOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Lambda(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::IfExp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Dict(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Set(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::ListComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::SetComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::DictComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::GeneratorExp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Await(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Yield(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::YieldFrom(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Compare(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Call(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::FormattedValue(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::JoinedStr(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Constant(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Attribute(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Subscript(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Starred(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Name(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::List(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Tuple(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Slice(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprBoolOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - op, - values, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (op.to_pyo3_ast(py)?, values.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprNamedExpr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - value, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (target.to_pyo3_ast(py)?, value.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprBinOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - left, - op, - right, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - left.to_pyo3_ast(py)?, - op.to_pyo3_ast(py)?, - right.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprUnaryOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - op, - operand, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (op.to_pyo3_ast(py)?, operand.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprLambda { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - args, - body, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (args.to_pyo3_ast(py)?, body.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprIfExp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprDict { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - keys, - values, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (keys.to_pyo3_ast(py)?, values.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSet { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - range: _range, - } = self; - let instance = cache.0.call1(py, (elts.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprListComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSetComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprDictComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - key, - value, - generators, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - key.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - generators.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprGeneratorExp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprAwait { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprYield { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprYieldFrom { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprCompare { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - left, - ops, - comparators, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - left.to_pyo3_ast(py)?, - ops.to_pyo3_ast(py)?, - comparators.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprCall { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - func, - args, - keywords, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - func.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - keywords.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprFormattedValue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - conversion, - format_spec, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - conversion.to_pyo3_ast(py)?, - format_spec.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprJoinedStr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - values, - range: _range, - } = self; - let instance = cache.0.call1(py, (values.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprConstant { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - kind, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (value.to_pyo3_ast(py)?, kind.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprAttribute { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - attr, - ctx, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - attr.to_pyo3_ast(py)?, - ctx.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSubscript { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - slice, - ctx, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - slice.to_pyo3_ast(py)?, - ctx.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprStarred { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (value.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprName { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - id, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (id.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprList { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elts.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprTuple { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elts.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSlice { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - lower, - upper, - step, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - lower.to_pyo3_ast(py)?, - upper.to_pyo3_ast(py)?, - step.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Comprehension { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - ifs, - is_async, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - ifs.to_pyo3_ast(py)?, - is_async.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Excepthandler { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Excepthandler::ExceptHandler(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExcepthandlerExceptHandler { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - type_, - name, - body, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - type_.to_pyo3_ast(py)?, - name.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Arguments { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - posonlyargs, - args, - vararg, - kwonlyargs, - kw_defaults, - kwarg, - defaults, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - posonlyargs.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - vararg.to_pyo3_ast(py)?, - kwonlyargs.to_pyo3_ast(py)?, - kw_defaults.to_pyo3_ast(py)?, - kwarg.to_pyo3_ast(py)?, - defaults.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Arg { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - arg, - annotation, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - arg.to_pyo3_ast(py)?, - annotation.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Keyword { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - arg, - value, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (arg.to_pyo3_ast(py)?, value.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Alias { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - asname, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (name.to_pyo3_ast(py)?, asname.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Withitem { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - context_expr, - optional_vars, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - context_expr.to_pyo3_ast(py)?, - optional_vars.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::MatchCase { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - pattern, - guard, - body, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - pattern.to_pyo3_ast(py)?, - guard.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Pattern { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Pattern::MatchValue(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchSingleton(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchSequence(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchMapping(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchClass(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchStar(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchAs(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchOr(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchValue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchSingleton { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchSequence { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - patterns, - range: _range, - } = self; - let instance = cache.0.call1(py, (patterns.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchMapping { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - keys, - patterns, - rest, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - keys.to_pyo3_ast(py)?, - patterns.to_pyo3_ast(py)?, - rest.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchClass { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - cls, - patterns, - kwd_attrs, - kwd_patterns, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - cls.to_pyo3_ast(py)?, - patterns.to_pyo3_ast(py)?, - kwd_attrs.to_pyo3_ast(py)?, - kwd_patterns.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchStar { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - range: _range, - } = self; - let instance = cache.0.call1(py, (name.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchAs { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - pattern, - name, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (pattern.to_pyo3_ast(py)?, name.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchOr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - patterns, - range: _range, - } = self; - let instance = cache.0.call1(py, (patterns.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::TypeIgnore { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::TypeIgnore::TypeIgnore(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::TypeIgnoreTypeIgnore { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - lineno, - tag, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (lineno.to_pyo3_ast(py)?, tag.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Mod { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Mod::Module(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::Interactive(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::Expression(cons) => cons.to_pyo3_ast(py)?, - crate::Mod::FunctionType(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModModule { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - type_ignores, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (body.to_pyo3_ast(py)?, type_ignores.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModInteractive { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - range: _range, - } = self; - let instance = cache.0.call1(py, (body.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModExpression { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - range: _range, - } = self; - let instance = cache.0.call1(py, (body.to_pyo3_ast(py)?,))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ModFunctionType { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - argtypes, - returns, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (argtypes.to_pyo3_ast(py)?, returns.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Stmt { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Stmt::FunctionDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncFunctionDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::ClassDef(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Return(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Delete(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Assign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AugAssign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AnnAssign(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::For(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncFor(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::While(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::If(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::With(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::AsyncWith(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Match(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Raise(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Try(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::TryStar(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Assert(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Import(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::ImportFrom(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Global(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Nonlocal(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Expr(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Pass(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Break(cons) => cons.to_pyo3_ast(py)?, - crate::Stmt::Continue(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtFunctionDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - args, - body, - decorator_list, - returns, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - returns.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncFunctionDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - args, - body, - decorator_list, - returns, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - returns.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtClassDef { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - bases, - keywords, - body, - decorator_list, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - name.to_pyo3_ast(py)?, - bases.to_pyo3_ast(py)?, - keywords.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - decorator_list.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtReturn { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtDelete { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - targets, - range: _range, - } = self; - let instance = cache.0.call1(py, (targets.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - targets, - value, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - targets.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAugAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - op, - value, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - op.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAnnAssign { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - annotation, - value, - simple, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - annotation.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - simple.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtFor { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - body, - orelse, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncFor { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - body, - orelse, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtWhile { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtIf { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtWith { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - items, - body, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - items.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAsyncWith { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - items, - body, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - items.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtMatch { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - subject, - cases, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (subject.to_pyo3_ast(py)?, cases.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtRaise { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - exc, - cause, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (exc.to_pyo3_ast(py)?, cause.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtTry { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - handlers, - orelse, - finalbody, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - body.to_pyo3_ast(py)?, - handlers.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - finalbody.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtTryStar { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - body, - handlers, - orelse, - finalbody, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - body.to_pyo3_ast(py)?, - handlers.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - finalbody.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtAssert { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - msg, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (test.to_pyo3_ast(py)?, msg.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtImport { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtImportFrom { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - module, - names, - level, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - module.to_pyo3_ast(py)?, - names.to_pyo3_ast(py)?, - level.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtGlobal { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtNonlocal { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - names, - range: _range, - } = self; - let instance = cache.0.call1(py, (names.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtExpr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtPass { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtBreak { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::StmtContinue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let instance = cache.0.call0(py)?; - let Self { range: _range } = self; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Expr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Expr::BoolOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::NamedExpr(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::BinOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::UnaryOp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Lambda(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::IfExp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Dict(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Set(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::ListComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::SetComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::DictComp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::GeneratorExp(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Await(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Yield(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::YieldFrom(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Compare(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Call(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::FormattedValue(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::JoinedStr(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Constant(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Attribute(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Subscript(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Starred(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Name(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::List(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Tuple(cons) => cons.to_pyo3_ast(py)?, - crate::Expr::Slice(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprBoolOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - op, - values, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (op.to_pyo3_ast(py)?, values.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprNamedExpr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - value, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (target.to_pyo3_ast(py)?, value.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprBinOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - left, - op, - right, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - left.to_pyo3_ast(py)?, - op.to_pyo3_ast(py)?, - right.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprUnaryOp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - op, - operand, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (op.to_pyo3_ast(py)?, operand.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprLambda { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - args, - body, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (args.to_pyo3_ast(py)?, body.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprIfExp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - test, - body, - orelse, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - test.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - orelse.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprDict { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - keys, - values, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (keys.to_pyo3_ast(py)?, values.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSet { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - range: _range, - } = self; - let instance = cache.0.call1(py, (elts.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprListComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSetComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprDictComp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - key, - value, - generators, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - key.to_pyo3_ast(py)?, - value.to_pyo3_ast(py)?, - generators.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprGeneratorExp { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elt, - generators, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elt.to_pyo3_ast(py)?, generators.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprAwait { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprYield { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprYieldFrom { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprCompare { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - left, - ops, - comparators, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - left.to_pyo3_ast(py)?, - ops.to_pyo3_ast(py)?, - comparators.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprCall { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - func, - args, - keywords, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - func.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - keywords.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprFormattedValue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - conversion, - format_spec, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - conversion.to_pyo3_ast(py)?, - format_spec.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprJoinedStr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - values, - range: _range, - } = self; - let instance = cache.0.call1(py, (values.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprConstant { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - kind, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (value.to_pyo3_ast(py)?, kind.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprAttribute { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - attr, - ctx, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - attr.to_pyo3_ast(py)?, - ctx.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSubscript { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - slice, - ctx, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - value.to_pyo3_ast(py)?, - slice.to_pyo3_ast(py)?, - ctx.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprStarred { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (value.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprName { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - id, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (id.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprList { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elts.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprTuple { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - elts, - ctx, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (elts.to_pyo3_ast(py)?, ctx.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExprSlice { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - lower, - upper, - step, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - lower.to_pyo3_ast(py)?, - upper.to_pyo3_ast(py)?, - step.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Comprehension { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - target, - iter, - ifs, - is_async, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - target.to_pyo3_ast(py)?, - iter.to_pyo3_ast(py)?, - ifs.to_pyo3_ast(py)?, - is_async.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Excepthandler { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Excepthandler::ExceptHandler(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::ExcepthandlerExceptHandler { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - type_, - name, - body, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - type_.to_pyo3_ast(py)?, - name.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Arguments { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - posonlyargs, - args, - vararg, - kwonlyargs, - kw_defaults, - kwarg, - defaults, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - posonlyargs.to_pyo3_ast(py)?, - args.to_pyo3_ast(py)?, - vararg.to_pyo3_ast(py)?, - kwonlyargs.to_pyo3_ast(py)?, - kw_defaults.to_pyo3_ast(py)?, - kwarg.to_pyo3_ast(py)?, - defaults.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Arg { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - arg, - annotation, - type_comment, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - arg.to_pyo3_ast(py)?, - annotation.to_pyo3_ast(py)?, - type_comment.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Keyword { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - arg, - value, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (arg.to_pyo3_ast(py)?, value.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Alias { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - asname, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (name.to_pyo3_ast(py)?, asname.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::Withitem { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - context_expr, - optional_vars, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - context_expr.to_pyo3_ast(py)?, - optional_vars.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::MatchCase { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - pattern, - guard, - body, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - pattern.to_pyo3_ast(py)?, - guard.to_pyo3_ast(py)?, - body.to_pyo3_ast(py)?, - ), - )?; - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::Pattern { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::Pattern::MatchValue(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchSingleton(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchSequence(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchMapping(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchClass(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchStar(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchAs(cons) => cons.to_pyo3_ast(py)?, - crate::Pattern::MatchOr(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchValue { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchSingleton { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - value, - range: _range, - } = self; - let instance = cache.0.call1(py, (value.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchSequence { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - patterns, - range: _range, - } = self; - let instance = cache.0.call1(py, (patterns.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchMapping { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - keys, - patterns, - rest, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - keys.to_pyo3_ast(py)?, - patterns.to_pyo3_ast(py)?, - rest.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchClass { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - cls, - patterns, - kwd_attrs, - kwd_patterns, - range: _range, - } = self; - let instance = cache.0.call1( - py, - ( - cls.to_pyo3_ast(py)?, - patterns.to_pyo3_ast(py)?, - kwd_attrs.to_pyo3_ast(py)?, - kwd_patterns.to_pyo3_ast(py)?, - ), - )?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchStar { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - name, - range: _range, - } = self; - let instance = cache.0.call1(py, (name.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchAs { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - pattern, - name, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (pattern.to_pyo3_ast(py)?, name.to_pyo3_ast(py)?))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::PatternMatchOr { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - patterns, - range: _range, - } = self; - let instance = cache.0.call1(py, (patterns.to_pyo3_ast(py)?,))?; - - let cache = ast_key_cache().get().unwrap(); - instance.setattr(py, cache.lineno.as_ref(py), _range.start.row.get())?; - instance.setattr(py, cache.col_offset.as_ref(py), _range.start.column.get())?; - if let Some(end) = _range.end { - instance.setattr(py, cache.end_lineno.as_ref(py), end.row.get())?; - instance.setattr(py, cache.end_col_offset.as_ref(py), end.column.get())?; - } - - Ok(instance) - } -} - -impl ToPyo3Ast for crate::generic::TypeIgnore { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let instance = match &self { - crate::TypeIgnore::TypeIgnore(cons) => cons.to_pyo3_ast(py)?, - }; - Ok(instance) - } -} - -impl ToPyo3Ast for crate::TypeIgnoreTypeIgnore { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let cache = Self::py_type_cache().get().unwrap(); - - let Self { - lineno, - tag, - range: _range, - } = self; - let instance = cache - .0 - .call1(py, (lineno.to_pyo3_ast(py)?, tag.to_pyo3_ast(py)?))?; - - Ok(instance) - } -} - -fn init_types(py: Python) -> PyResult<()> { - let ast_module = PyModule::import(py, "_ast")?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - cache_py_type::(ast_module)?; - Ok(()) -} diff --git a/ast/src/generic.rs b/ast/src/generic.rs index 318a7bf..bb30e68 100644 --- a/ast/src/generic.rs +++ b/ast/src/generic.rs @@ -45,4 +45,21 @@ impl Default for EmptyRange { } } +impl Cmpop { + pub fn as_str(&self) -> &'static str { + match self { + Cmpop::Eq => "==", + Cmpop::NotEq => "!=", + Cmpop::Lt => "<", + Cmpop::LtE => "<=", + Cmpop::Gt => ">", + Cmpop::GtE => ">=", + Cmpop::Is => "is", + Cmpop::IsNot => "is not", + Cmpop::In => "in", + Cmpop::NotIn => "not in", + } + } +} + include!("gen/generic.rs"); diff --git a/ast/src/lib.rs b/ast/src/lib.rs index 21cca63..5a3c1ff 100644 --- a/ast/src/lib.rs +++ b/ast/src/lib.rs @@ -41,8 +41,3 @@ pub use visitor::Visitor; mod optimizer; #[cfg(feature = "constant-optimization")] pub use optimizer::ConstantOptimizer; - -#[cfg(feature = "pyo3")] -pub mod pyo3; -#[cfg(feature = "pyo3-wrapper")] -pub mod pyo3_wrapper; diff --git a/ast/src/pyo3.rs b/ast/src/pyo3.rs deleted file mode 100644 index 74e5172..0000000 --- a/ast/src/pyo3.rs +++ /dev/null @@ -1,153 +0,0 @@ -use crate::{source_code::SourceRange, text_size::TextRange, ConversionFlag, Node}; -use num_complex::Complex64; -use once_cell::sync::OnceCell; -use pyo3::{ - prelude::*, - types::{PyBytes, PyList, PyString, PyTuple}, -}; - -pub trait Pyo3Node { - fn py_type_cache() -> &'static OnceCell<(Py, Py)> { - { - static PY_TYPE: OnceCell<(Py, Py)> = OnceCell::new(); - &PY_TYPE - } - } -} - -pub trait ToPyo3Ast { - fn to_pyo3_ast(&self, py: Python) -> PyResult>; -} - -impl ToPyo3Ast for Box { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - (**self).to_pyo3_ast(py) - } -} - -impl ToPyo3Ast for Option { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - match self { - Some(ast) => ast.to_pyo3_ast(py), - None => Ok(py.None()), - } - } -} - -impl ToPyo3Ast for Vec { - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let elts = self - .iter() - .map(|item| item.to_pyo3_ast(py)) - .collect::, _>>()?; - let list = PyList::new(py, elts); - Ok(list.into()) - } -} - -impl ToPyo3Ast for crate::Identifier { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - Ok(self.as_str().to_object(py)) - } -} - -impl ToPyo3Ast for crate::String { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - Ok(self.as_str().to_object(py)) - } -} - -impl ToPyo3Ast for crate::Int { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - Ok((self.to_u32()).to_object(py)) - } -} - -impl ToPyo3Ast for bool { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - Ok((*self as u32).to_object(py)) - } -} - -impl ToPyo3Ast for ConversionFlag { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - Ok((*self as i8).to_object(py)) - } -} - -impl ToPyo3Ast for crate::Constant { - #[inline] - fn to_pyo3_ast(&self, py: Python) -> PyResult> { - let value = match self { - crate::Constant::None => py.None(), - crate::Constant::Bool(bool) => bool.to_object(py), - crate::Constant::Str(string) => string.to_object(py), - crate::Constant::Bytes(bytes) => PyBytes::new(py, bytes).into(), - crate::Constant::Int(int) => int.to_object(py), - crate::Constant::Tuple(elts) => { - let elts: PyResult> = elts.iter().map(|c| c.to_pyo3_ast(py)).collect(); - PyTuple::new(py, elts?).into() - } - crate::Constant::Float(f64) => f64.to_object(py), - crate::Constant::Complex { real, imag } => Complex64::new(*real, *imag).to_object(py), - crate::Constant::Ellipsis => py.Ellipsis(), - }; - Ok(value) - } -} - -#[pyclass(module = "rustpython_ast", subclass)] -pub struct AST; - -#[pymethods] -impl AST { - #[new] - fn new() -> Self { - Self - } -} - -fn cache_py_type(ast_module: &PyAny) -> PyResult<()> { - let class = ast_module.getattr(N::NAME)?; - let base = if std::mem::size_of::() == 0 { - class.call0()? - } else { - class.getattr("__new__")? - }; - N::py_type_cache().get_or_init(|| (class.into(), base.into())); - Ok(()) -} - -struct AstKeyCache { - lineno: Py, - col_offset: Py, - end_lineno: Py, - end_col_offset: Py, -} - -fn ast_key_cache() -> &'static OnceCell { - { - static PY_TYPE: OnceCell = OnceCell::new(); - &PY_TYPE - } -} - -pub fn init(py: Python) -> PyResult<()> { - ast_key_cache().get_or_init(|| AstKeyCache { - lineno: pyo3::intern!(py, "lineno").into_py(py), - col_offset: pyo3::intern!(py, "col_offset").into_py(py), - end_lineno: pyo3::intern!(py, "end_lineno").into_py(py), - end_col_offset: pyo3::intern!(py, "end_col_offset").into_py(py), - }); - - init_types(py) -} - -include!("gen/to_pyo3.rs"); diff --git a/ast/src/pyo3_wrapper.rs b/ast/src/pyo3_wrapper.rs deleted file mode 100644 index a622ed0..0000000 --- a/ast/src/pyo3_wrapper.rs +++ /dev/null @@ -1,128 +0,0 @@ -use crate::pyo3::{Pyo3Node, AST}; -use crate::{source_code::SourceRange, text_size::TextRange, ConversionFlag, Node}; -use num_complex::Complex64; -use pyo3::prelude::*; -use pyo3::types::{PyBytes, PyList, PyTuple}; - -pub trait ToPyo3Wrapper { - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult>; -} - -impl ToPyo3Wrapper for Box { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - (**self).to_pyo3_wrapper(py) - } -} - -impl ToPyo3Wrapper for Option { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - match self { - Some(ast) => ast.to_pyo3_wrapper(py), - None => Ok(py.None()), - } - } -} - -impl ToPyo3Wrapper for crate::Identifier { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - Ok(self.as_str().to_object(py)) - } -} - -impl ToPyo3Wrapper for crate::String { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - Ok(self.as_str().to_object(py)) - } -} - -impl ToPyo3Wrapper for crate::Int { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - Ok((self.to_u32()).to_object(py)) - } -} - -impl ToPyo3Wrapper for bool { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - Ok((*self as u32).to_object(py)) - } -} - -impl ToPyo3Wrapper for ConversionFlag { - #[inline] - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - Ok((*self as i8).to_object(py)) - } -} - -impl ToPyo3Wrapper for crate::Constant { - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - let value = match self { - crate::Constant::None => py.None(), - crate::Constant::Bool(bool) => bool.to_object(py), - crate::Constant::Str(string) => string.to_object(py), - crate::Constant::Bytes(bytes) => PyBytes::new(py, bytes).into(), - crate::Constant::Int(int) => int.to_object(py), - crate::Constant::Tuple(elts) => { - let elts: PyResult> = elts.iter().map(|c| c.to_pyo3_wrapper(py)).collect(); - PyTuple::new(py, elts?).into() - } - crate::Constant::Float(f64) => f64.to_object(py), - crate::Constant::Complex { real, imag } => Complex64::new(*real, *imag).to_object(py), - crate::Constant::Ellipsis => py.Ellipsis(), - }; - Ok(value) - } -} - -impl ToPyo3Wrapper for Vec { - fn to_pyo3_wrapper(&'static self, py: Python) -> PyResult> { - let list = PyList::empty(py); - for item in self { - let py_item = item.to_pyo3_wrapper(py)?; - list.append(py_item)?; - } - Ok(list.into()) - } -} - -pub mod located { - use super::*; - pub use crate::pyo3::AST; - include!("gen/pyo3_wrapper_located.rs"); -} - -pub mod ranged { - use super::*; - pub use crate::pyo3::AST; - include!("gen/pyo3_wrapper_ranged.rs"); -} - -fn init_type(py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::

()?; - let node = m.getattr(P::NAME)?; - if P::NAME != N::NAME { - // TODO: no idea how to escape rust keyword on #[pyclass] - m.setattr(P::NAME, node)?; - } - let names: Vec<&'static str> = N::FIELD_NAMES.to_vec(); - let fields = PyTuple::new(py, names); - node.setattr("_fields", fields)?; - Ok(()) -} - -/// A Python module implemented in Rust. -fn init_module(py: Python, m: &PyModule) -> PyResult<()> { - m.add_class::()?; - - let ast = m.getattr("AST")?; - let fields = PyTuple::empty(py); - ast.setattr("_fields", fields)?; - - Ok(()) -} diff --git a/ast/src/unparse.rs b/ast/src/unparse.rs index ebfe99a..66342ee 100644 --- a/ast/src/unparse.rs +++ b/ast/src/unparse.rs @@ -1,5 +1,5 @@ use crate::ConversionFlag; -use crate::{Arg, Arguments, Boolop, Cmpop, Comprehension, Constant, Expr, Identifier, Operator}; +use crate::{Arg, Arguments, Boolop, Comprehension, Constant, Expr, Identifier, Operator}; use std::fmt; mod precedence { @@ -285,19 +285,9 @@ impl<'a> Unparser<'a> { let new_lvl = precedence::CMP + 1; self.unparse_expr(left, new_lvl)?; for (op, cmp) in ops.iter().zip(comparators) { - let op = match op { - Cmpop::Eq => " == ", - Cmpop::NotEq => " != ", - Cmpop::Lt => " < ", - Cmpop::LtE => " <= ", - Cmpop::Gt => " > ", - Cmpop::GtE => " >= ", - Cmpop::Is => " is ", - Cmpop::IsNot => " is not ", - Cmpop::In => " in ", - Cmpop::NotIn => " not in ", - }; - self.p(op)?; + self.p(" ")?; + self.p(op.as_str())?; + self.p(" ")?; self.unparse_expr(cmp, new_lvl)?; } }) diff --git a/parser/README.md b/parser/README.md index ebe9eb6..e79eb87 100644 --- a/parser/README.md +++ b/parser/README.md @@ -60,7 +60,8 @@ Execution mode check. Allowed modes are `exec`, `eval` or `single`. For example, one could do this: ``` - use rustpython_parser::{parser, ast}; + use rustpython_parser::{Parse, ast}; let python_source = "print('Hello world')"; - let python_ast = parser::parse_expression(python_source).unwrap(); + let python_statements = ast::Suite::parse(python_source).unwrap(); // statements + let python_expr = ast::Expr::parse(python_source).unwrap(); // or expr ``` diff --git a/parser/src/context.rs b/parser/src/context.rs index 65734d2..9013624 100644 --- a/parser/src/context.rs +++ b/parser/src/context.rs @@ -49,19 +49,19 @@ pub(crate) fn set_context(expr: Expr, ctx: ExprContext) -> Expr { #[cfg(test)] mod tests { - use crate::parser::parse_program; + use crate::{ast, Parse}; #[test] fn test_assign_name() { let source = "x = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_tuple() { let source = "(x, y) = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -69,35 +69,35 @@ mod tests { #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_assign_list() { let source = "[x, y] = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_attribute() { let source = "x.y = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_subscript() { let source = "x[y] = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_starred() { let source = "(x, *y) = (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_for() { let source = "for x in (1, 2, 3): pass"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -105,7 +105,7 @@ mod tests { #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_assign_list_comp() { let source = "x = [y for y in (1, 2, 3)]"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -113,7 +113,7 @@ mod tests { #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_assign_set_comp() { let source = "x = {y for y in (1, 2, 3)}"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -121,63 +121,63 @@ mod tests { #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_assign_with() { let source = "with 1 as x: pass"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_assign_named_expr() { let source = "if x:= 1: pass"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_ann_assign_name() { let source = "x: int = 1"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_aug_assign_name() { let source = "x += 1"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_aug_assign_attribute() { let source = "x.y += (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_aug_assign_subscript() { let source = "x[y] += (1, 2, 3)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_del_name() { let source = "del x"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_del_attribute() { let source = "del x.y"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_del_subscript() { let source = "del x[y]"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } } diff --git a/parser/src/function.rs b/parser/src/function.rs index d3f24f8..132e7ae 100644 --- a/parser/src/function.rs +++ b/parser/src/function.rs @@ -155,7 +155,7 @@ const fn is_starred(exp: &ast::Expr) -> bool { #[cfg(test)] mod tests { use super::*; - use crate::parser::{parse_program, ParseErrorType}; + use crate::{ast, parser::ParseErrorType, Parse}; #[cfg(not(feature = "all-nodes-with-ranges"))] macro_rules! function_and_lambda { @@ -163,7 +163,7 @@ mod tests { $( #[test] fn $name() { - let parse_ast = parse_program($code, ""); + let parse_ast = ast::Suite::parse($code, ""); insta::assert_debug_snapshot!(parse_ast); } )* @@ -190,7 +190,7 @@ mod tests { } fn function_parse_error(src: &str) -> LexicalErrorType { - let parse_ast = parse_program(src, ""); + let parse_ast = ast::Suite::parse(src, ""); parse_ast .map_err(|e| match e.error { ParseErrorType::Lexical(e) => e, diff --git a/parser/src/lexer.rs b/parser/src/lexer.rs index 1f24ce2..fac0dc0 100644 --- a/parser/src/lexer.rs +++ b/parser/src/lexer.rs @@ -212,7 +212,7 @@ pub fn lex_starts_at( source: &str, mode: Mode, start_offset: TextSize, -) -> impl Iterator + '_ { +) -> SoftKeywordTransformer>> { SoftKeywordTransformer::new(Lexer::new(source.chars(), start_offset), mode) } diff --git a/parser/src/lib.rs b/parser/src/lib.rs index 6268d07..53cec98 100644 --- a/parser/src/lib.rs +++ b/parser/src/lib.rs @@ -94,13 +94,13 @@ //! mode or tokenizing the source beforehand: //! //! ``` -//! use rustpython_parser::parse_program; +//! use rustpython_parser::{Parse, ast}; //! //! let python_source = r#" //! def is_odd(i): //! return bool(i & 1) //! "#; -//! let ast = parse_program(python_source, ""); +//! let ast = ast::Suite::parse(python_source, ""); //! //! assert!(ast.is_ok()); //! ``` @@ -126,13 +126,13 @@ mod soft_keywords; mod string; mod token; -pub use parser::{ - parse, parse_expression, parse_expression_starts_at, parse_program, parse_starts_at, - parse_tokens, ParseError, ParseErrorType, -}; +pub use parser::{parse, parse_starts_at, parse_tokens, Parse, ParseError, ParseErrorType}; pub use string::FStringErrorType; pub use token::{StringKind, Tok}; +#[allow(deprecated)] +pub use parser::{parse_expression, parse_expression_starts_at, parse_program}; + #[rustfmt::skip] mod python { #![allow(clippy::all)] diff --git a/parser/src/parser.rs b/parser/src/parser.rs index 8ecce8d..a42ac12 100644 --- a/parser/src/parser.rs +++ b/parser/src/parser.rs @@ -13,7 +13,7 @@ //! [`Mode`]: crate::mode use crate::{ - ast, + ast::{self, OptionalRange, Ranged}, lexer::{self, LexResult, LexicalError, LexicalErrorType}, python, text_size::TextSize, @@ -23,9 +23,179 @@ use crate::{ use itertools::Itertools; use std::iter; -use crate::text_size::TextRange; +use crate::{lexer::Lexer, soft_keywords::SoftKeywordTransformer, text_size::TextRange}; pub(super) use lalrpop_util::ParseError as LalrpopError; -use rustpython_ast::OptionalRange; + +/// Parse Python code string to implementor's type. +/// +/// # Example +/// +/// For example, parsing a simple function definition and a call to that function: +/// +/// ``` +/// use rustpython_parser::{self as parser, ast, Parse}; +/// let source = r#" +/// def foo(): +/// return 42 +/// +/// print(foo()) +/// "#; +/// let program = ast::Suite::parse(source, ""); +/// assert!(program.is_ok()); +/// ``` +/// +/// Parsing a single expression denoting the addition of two numbers, but this time specifying a different, +/// somewhat silly, location: +/// +/// ``` +/// use rustpython_parser::{self as parser, ast, Parse, text_size::TextSize}; +/// +/// let expr = ast::Expr::parse_starts_at("1 + 2", "", TextSize::from(400)); +/// assert!(expr.is_ok()); +pub trait Parse +where + Self: Sized, +{ + fn parse(source: &str, source_path: &str) -> Result { + Self::parse_starts_at(source, source_path, TextSize::default()) + } + fn parse_starts_at( + source: &str, + source_path: &str, + offset: TextSize, + ) -> Result { + let lxr = Self::lex_starts_at(source, offset); + #[cfg(feature = "full-lexer")] + let lxr = + lxr.filter_ok(|(tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline)); + Self::parse_tokens(lxr, source_path) + } + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer>; + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result; +} + +impl Parse for ast::ModModule { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + lexer::lex_starts_at(source, Mode::Module, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + match parse_filtered_tokens(lxr, Mode::Module, source_path)? { + ast::Mod::Module(m) => Ok(m), + _ => unreachable!("Mode::Module doesn't return other variant"), + } + } +} + +impl Parse for ast::ModExpression { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + lexer::lex_starts_at(source, Mode::Expression, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + match parse_filtered_tokens(lxr, Mode::Expression, source_path)? { + ast::Mod::Expression(m) => Ok(m), + _ => unreachable!("Mode::Module doesn't return other variant"), + } + } +} + +impl Parse for ast::ModInteractive { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + lexer::lex_starts_at(source, Mode::Interactive, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + match parse_filtered_tokens(lxr, Mode::Interactive, source_path)? { + ast::Mod::Interactive(m) => Ok(m), + _ => unreachable!("Mode::Module doesn't return other variant"), + } + } +} + +impl Parse for ast::Suite { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + ast::ModModule::lex_starts_at(source, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + Ok(ast::ModModule::parse_tokens(lxr, source_path)?.body) + } +} + +impl Parse for ast::Stmt { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + ast::ModModule::lex_starts_at(source, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + let mut statements = ast::ModModule::parse_tokens(lxr, source_path)?.body; + let statement = match statements.len() { + 0 => { + return Err(ParseError { + error: ParseErrorType::Eof, + offset: TextSize::default(), + source_path: source_path.to_owned(), + }) + } + 1 => statements.pop().unwrap(), + _ => { + return Err(ParseError { + error: ParseErrorType::InvalidToken, + offset: statements[1].range().start(), + source_path: source_path.to_owned(), + }) + } + }; + Ok(statement) + } +} + +impl Parse for ast::Expr { + fn lex_starts_at( + source: &str, + offset: TextSize, + ) -> SoftKeywordTransformer> { + ast::ModExpression::lex_starts_at(source, offset) + } + fn parse_tokens( + lxr: impl IntoIterator, + source_path: &str, + ) -> Result { + Ok(*ast::ModExpression::parse_tokens(lxr, source_path)?.body) + } +} /// Parse a full Python program usually consisting of multiple lines. /// @@ -47,6 +217,7 @@ use rustpython_ast::OptionalRange; /// let program = parser::parse_program(source, ""); /// assert!(program.is_ok()); /// ``` +#[deprecated = "Use ast::Suite::parse from rustpython_parser::Parse trait."] pub fn parse_program(source: &str, source_path: &str) -> Result { parse(source, Mode::Module, source_path).map(|top| match top { ast::Mod::Module(ast::ModModule { body, .. }) => body, @@ -71,8 +242,9 @@ pub fn parse_program(source: &str, source_path: &str) -> Result Result { - parse_expression_starts_at(source, path, TextSize::default()) + ast::Expr::parse(source, path) } /// Parses a Python expression from a given location. @@ -91,15 +263,13 @@ pub fn parse_expression(source: &str, path: &str) -> Result", TextSize::from(400)); /// assert!(expr.is_ok()); /// ``` +#[deprecated = "Use ast::Expr::parse_starts_at from rustpython_parser::Parse trait."] pub fn parse_expression_starts_at( source: &str, path: &str, offset: TextSize, ) -> Result { - parse_starts_at(source, Mode::Expression, path, offset).map(|top| match top { - ast::Mod::Expression(ast::ModExpression { body, .. }) => *body, - _ => unreachable!(), - }) + ast::Expr::parse_starts_at(source, path, offset) } /// Parse the given Python source code using the specified [`Mode`]. @@ -188,12 +358,21 @@ pub fn parse_tokens( lxr: impl IntoIterator, mode: Mode, source_path: &str, +) -> Result { + let lxr = lxr.into_iter(); + #[cfg(feature = "full-lexer")] + let lxr = + lxr.filter_ok(|(tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline)); + parse_filtered_tokens(lxr, mode, source_path) +} + +fn parse_filtered_tokens( + lxr: impl IntoIterator, + mode: Mode, + source_path: &str, ) -> Result { let marker_token = (Tok::start_marker(mode), Default::default()); let lexer = iter::once(Ok(marker_token)).chain(lxr); - #[cfg(feature = "full-lexer")] - let lexer = - lexer.filter_ok(|(tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline)); python::TopParser::new() .parse( lexer @@ -329,52 +508,53 @@ pub(super) fn optional_range(start: TextSize, end: TextSize) -> OptionalRange").unwrap(); + let parse_ast = ast::Suite::parse("", "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_string() { let source = "'Hello world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_f_string() { let source = "f'Hello world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_print_hello() { let source = "print('Hello world')"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_print_2() { let source = "print('Hello world', 2)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_kwargs() { let source = "my_func('positional', keyword=2)"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_if_elif_else() { let source = "if 1: 10\nelif 2: 20\nelse: 30"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -382,7 +562,7 @@ mod tests { #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_lambda() { let source = "lambda x, y: x * y"; // lambda(x, y): x * y"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -390,7 +570,7 @@ mod tests { fn test_parse_tuples() { let source = "a, b = 4, 5"; - insta::assert_debug_snapshot!(parse_program(source, "").unwrap()); + insta::assert_debug_snapshot!(ast::Suite::parse(source, "").unwrap()); } #[test] @@ -403,14 +583,14 @@ class Foo(A, B): def method_with_default(self, arg='default'): pass "; - insta::assert_debug_snapshot!(parse_program(source, "").unwrap()); + insta::assert_debug_snapshot!(ast::Suite::parse(source, "").unwrap()); } #[test] #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_dict_comprehension() { let source = "{x1: x2 for y in z}"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -418,7 +598,7 @@ class Foo(A, B): #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_list_comprehension() { let source = "[x for y in z]"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -426,7 +606,7 @@ class Foo(A, B): #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_double_list_comprehension() { let source = "[x for y, y2 in z for a in b if a < 5 if a > 10]"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -434,7 +614,7 @@ class Foo(A, B): #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_generator_comprehension() { let source = "(x for y in z)"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -442,7 +622,7 @@ class Foo(A, B): #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_named_expression_generator_comprehension() { let source = "(x := y + 1 for y in z)"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -450,28 +630,28 @@ class Foo(A, B): #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_parse_if_else_generator_comprehension() { let source = "(x if y else y for y in z)"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_bool_op_or() { let source = "x or y"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_bool_op_and() { let source = "x and y"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_slice() { let source = "x[1:2:3]"; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -506,7 +686,7 @@ with (0 as a,): pass with (0 as a, 1 as b): pass with (0 as a, 1 as b,): pass "; - insta::assert_debug_snapshot!(parse_program(source, "").unwrap()); + insta::assert_debug_snapshot!(ast::Suite::parse(source, "").unwrap()); } #[test] @@ -529,7 +709,7 @@ with (0 as a, 1 as b,): pass "with a := 0 as x: pass", "with (a := 0 as x): pass", ] { - assert!(parse_program(source, "").is_err()); + assert!(ast::Suite::parse(source, "").is_err()); } } @@ -541,7 +721,7 @@ array[0, *indexes, -1] = array_slice array[*indexes_to_select, *indexes_to_select] array[3:5, *indexes_to_select] "; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -555,13 +735,13 @@ array[3:5, *indexes_to_select] ("OFFSET %d" % offset) if offset else None, ) )"#; - let parse_ast = parse_expression(source, "").unwrap(); + let parse_ast = ast::Expr::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_try() { - let parse_ast = parse_program( + let parse_ast = ast::Suite::parse( r#"try: raise ValueError(1) except TypeError as e: @@ -576,7 +756,7 @@ except OSError as e: #[test] fn test_try_star() { - let parse_ast = parse_program( + let parse_ast = ast::Suite::parse( r#"try: raise ExceptionGroup("eg", [ValueError(1), TypeError(2), OSError(3), OSError(4)]) @@ -592,7 +772,7 @@ except* OSError as e: #[test] fn test_dict_unpacking() { - let parse_ast = parse_expression(r#"{"a": "b", **c, "d": "e"}"#, "").unwrap(); + let parse_ast = ast::Expr::parse(r#"{"a": "b", **c, "d": "e"}"#, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -608,7 +788,7 @@ except* OSError as e: #[test] #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_match_as_identifier() { - let parse_ast = parse_program( + let parse_ast = ast::Suite::parse( r#" match *a + b, c # ((match * a) + b), c match *(a + b), c # (match * (a + b)), c @@ -806,14 +986,14 @@ match w := x,: case y as v,: z = 0 "#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_match() { - let parse_ast = parse_program( + let parse_ast = ast::Suite::parse( r#" match {"test": 1}: case { @@ -844,7 +1024,7 @@ match x: #[test] #[cfg(not(feature = "all-nodes-with-ranges"))] fn test_variadic_generics() { - let parse_ast = parse_program( + let parse_ast = ast::Suite::parse( r#" def args_to_tuple(*args: *Ts) -> Tuple[*Ts]: ... "#, diff --git a/parser/src/python.lalrpop b/parser/src/python.lalrpop index 011e764..70a7ae8 100644 --- a/parser/src/python.lalrpop +++ b/parser/src/python.lalrpop @@ -114,11 +114,11 @@ ExpressionStatement: ast::Stmt = { let mut targets = vec![set_context(expression, ast::ExprContext::Store)]; let mut values = suffix; - while values.len() > 1 { - targets.push(set_context(values.remove(0), ast::ExprContext::Store)); - } + let value = Box::new(values.pop().unwrap()); - let value = Box::new(values.into_iter().next().unwrap()); + for target in values { + targets.push(set_context(target, ast::ExprContext::Store)); + } ast::Stmt::Assign( ast::StmtAssign { targets, value, type_comment: None, range: (location..end_location).into() } @@ -387,7 +387,9 @@ MatchStatement: ast::Stmt = { } MatchCase: ast::MatchCase = { - "case" ":" => { + "case" ":" => { + // SAFETY: `body` is never empty because it is non-optional and `Suite` matches one or more statements. + let end = body.last().unwrap().end(); ast::MatchCase { pattern, guard: guard.map(Box::new), diff --git a/parser/src/python.rs b/parser/src/python.rs index 6ea0894..25e7f94 100644 --- a/parser/src/python.rs +++ b/parser/src/python.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.20.0" -// sha3: f95a98ddc92e7f056dba3f921c7c9b36d7725b180106324fd00b6157a1c36fe7 +// sha3: 296701055ca179a96941a32e449ac86c8d9717215b1dc90c07a7f617741ffa73 use crate::{ ast::{self as ast, Ranged}, lexer::{LexicalError, LexicalErrorType}, @@ -11856,11 +11856,11 @@ mod __parse__Top { __reduce158(__lookahead_start, __symbols, core::marker::PhantomData::<()>) } 159 => { - // ArgumentList = FunctionArgument => ActionFn(1454); + // ArgumentList = FunctionArgument => ActionFn(1453); let __sym0 = __pop_Variant29(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1454::<>(__sym0) { + let __nt = match super::__action1453::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11868,10 +11868,10 @@ mod __parse__Top { (1, 83) } 160 => { - // ArgumentList = => ActionFn(1455); + // ArgumentList = => ActionFn(1454); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = match super::__action1455::<>(&__start, &__end) { + let __nt = match super::__action1454::<>(&__start, &__end) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11879,13 +11879,13 @@ mod __parse__Top { (0, 83) } 161 => { - // ArgumentList = ( ",")+, FunctionArgument => ActionFn(1456); + // ArgumentList = ( ",")+, FunctionArgument => ActionFn(1455); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant29(__symbols); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1456::<>(__sym0, __sym1) { + let __nt = match super::__action1455::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -11893,11 +11893,11 @@ mod __parse__Top { (2, 83) } 162 => { - // ArgumentList = ( ",")+ => ActionFn(1457); + // ArgumentList = ( ",")+ => ActionFn(1456); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1457::<>(__sym0) { + let __nt = match super::__action1456::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -12986,7 +12986,7 @@ mod __parse__Top { __reduce429(__lookahead_start, __symbols, core::marker::PhantomData::<()>) } 430 => { - // LambdaDef = "lambda", ParameterList, ":", Test<"all"> => ActionFn(1622); + // LambdaDef = "lambda", ParameterList, ":", Test<"all"> => ActionFn(1621); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant15(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -12994,7 +12994,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1622::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1621::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13002,14 +13002,14 @@ mod __parse__Top { (4, 160) } 431 => { - // LambdaDef = "lambda", ":", Test<"all"> => ActionFn(1623); + // LambdaDef = "lambda", ":", Test<"all"> => ActionFn(1622); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1623::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1622::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13329,7 +13329,7 @@ mod __parse__Top { __reduce529(__lookahead_start, __symbols, core::marker::PhantomData::<()>) } 530 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1502); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1501); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -13340,7 +13340,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1502::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1501::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13348,7 +13348,7 @@ mod __parse__Top { (7, 200) } 531 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1503); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1502); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -13361,7 +13361,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1503::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1502::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13369,7 +13369,7 @@ mod __parse__Top { (9, 200) } 532 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1504); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1503); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -13383,7 +13383,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1504::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1503::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13391,7 +13391,7 @@ mod __parse__Top { (10, 200) } 533 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1505); + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1504); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -13401,7 +13401,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1505::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1504::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13409,7 +13409,7 @@ mod __parse__Top { (6, 200) } 534 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1506); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1505); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant9(__symbols); @@ -13421,7 +13421,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1506::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1505::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13429,7 +13429,7 @@ mod __parse__Top { (8, 200) } 535 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1507); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1506); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -13442,7 +13442,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1507::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1506::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13450,7 +13450,7 @@ mod __parse__Top { (9, 200) } 536 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1508); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1507); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant9(__symbols); @@ -13462,7 +13462,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1508::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1507::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13470,7 +13470,7 @@ mod __parse__Top { (8, 200) } 537 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1509); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1508); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -13484,7 +13484,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1509::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1508::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13492,7 +13492,7 @@ mod __parse__Top { (10, 200) } 538 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1510); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1509); assert!(__symbols.len() >= 11); let __sym10 = __pop_Variant0(__symbols); let __sym9 = __pop_Variant9(__symbols); @@ -13507,7 +13507,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym10.2; - let __nt = match super::__action1510::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + let __nt = match super::__action1509::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13515,7 +13515,7 @@ mod __parse__Top { (11, 200) } 539 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1511); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1510); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -13526,7 +13526,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1511::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1510::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13534,7 +13534,7 @@ mod __parse__Top { (7, 200) } 540 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1512); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1511); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -13547,7 +13547,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1512::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1511::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13555,7 +13555,7 @@ mod __parse__Top { (9, 200) } 541 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1513); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1512); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -13569,7 +13569,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1513::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1512::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13577,7 +13577,7 @@ mod __parse__Top { (10, 200) } 542 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, "," => ActionFn(1514); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, "," => ActionFn(1513); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant81(__symbols); @@ -13586,7 +13586,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1514::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1513::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13594,7 +13594,7 @@ mod __parse__Top { (5, 200) } 543 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, "," => ActionFn(1515); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, "," => ActionFn(1514); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant81(__symbols); @@ -13605,7 +13605,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1515::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1514::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13613,7 +13613,7 @@ mod __parse__Top { (7, 200) } 544 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, "," => ActionFn(1516); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, "," => ActionFn(1515); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant81(__symbols); @@ -13625,7 +13625,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1516::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1515::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13633,7 +13633,7 @@ mod __parse__Top { (8, 200) } 545 => { - // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1517); + // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1516); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -13641,7 +13641,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1517::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1516::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13649,7 +13649,7 @@ mod __parse__Top { (4, 200) } 546 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1518); + // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1517); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -13659,7 +13659,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1518::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1517::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13667,7 +13667,7 @@ mod __parse__Top { (6, 200) } 547 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1519); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1518); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -13678,7 +13678,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1519::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1518::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13686,7 +13686,7 @@ mod __parse__Top { (7, 200) } 548 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1520); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1519); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -13696,7 +13696,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1520::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1519::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13704,7 +13704,7 @@ mod __parse__Top { (6, 200) } 549 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1521); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1520); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant12(__symbols); @@ -13716,7 +13716,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1521::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1520::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13724,7 +13724,7 @@ mod __parse__Top { (8, 200) } 550 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1522); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, "," => ActionFn(1521); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant12(__symbols); @@ -13737,7 +13737,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1522::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1521::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13745,7 +13745,7 @@ mod __parse__Top { (9, 200) } 551 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1523); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1522); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -13754,7 +13754,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1523::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1522::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13762,7 +13762,7 @@ mod __parse__Top { (5, 200) } 552 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1524); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1523); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant12(__symbols); @@ -13773,7 +13773,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1524::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1523::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13781,7 +13781,7 @@ mod __parse__Top { (7, 200) } 553 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1525); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1524); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant12(__symbols); @@ -13793,7 +13793,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1525::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1524::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13801,13 +13801,13 @@ mod __parse__Top { (8, 200) } 554 => { - // ParameterList = OneOrMore>, "," => ActionFn(1526); + // ParameterList = OneOrMore>, "," => ActionFn(1525); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1526::<>(__sym0, __sym1) { + let __nt = match super::__action1525::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13815,7 +13815,7 @@ mod __parse__Top { (2, 200) } 555 => { - // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1527); + // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1526); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -13823,7 +13823,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1527::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1526::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13831,7 +13831,7 @@ mod __parse__Top { (4, 200) } 556 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1528); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1527); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -13840,7 +13840,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1528::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1527::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13848,7 +13848,7 @@ mod __parse__Top { (5, 200) } 557 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1529); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1528); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -13858,7 +13858,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1529::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1528::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13866,7 +13866,7 @@ mod __parse__Top { (6, 200) } 558 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1530); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1529); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -13878,7 +13878,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1530::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1529::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13886,7 +13886,7 @@ mod __parse__Top { (8, 200) } 559 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1531); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ",", KwargParameter => ActionFn(1530); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -13899,7 +13899,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1531::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1530::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13907,7 +13907,7 @@ mod __parse__Top { (9, 200) } 560 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1532); + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1531); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -13916,7 +13916,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1532::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1531::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13924,7 +13924,7 @@ mod __parse__Top { (5, 200) } 561 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1533); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1532); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant9(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -13935,7 +13935,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1533::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1532::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13943,7 +13943,7 @@ mod __parse__Top { (7, 200) } 562 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1534); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1533); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -13955,7 +13955,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1534::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1533::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13963,7 +13963,7 @@ mod __parse__Top { (8, 200) } 563 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1535); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1534); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant9(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -13974,7 +13974,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1535::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1534::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -13982,7 +13982,7 @@ mod __parse__Top { (7, 200) } 564 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1536); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1535); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -13995,7 +13995,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1536::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1535::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14003,7 +14003,7 @@ mod __parse__Top { (9, 200) } 565 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1537); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1536); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant9(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -14017,7 +14017,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1537::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1536::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14025,7 +14025,7 @@ mod __parse__Top { (10, 200) } 566 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1538); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1537); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -14035,7 +14035,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1538::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1537::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14043,7 +14043,7 @@ mod __parse__Top { (6, 200) } 567 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1539); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1538); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -14055,7 +14055,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1539::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1538::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14063,7 +14063,7 @@ mod __parse__Top { (8, 200) } 568 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1540); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1539); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -14076,7 +14076,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1540::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1539::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14084,7 +14084,7 @@ mod __parse__Top { (9, 200) } 569 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter => ActionFn(1541); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter => ActionFn(1540); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant81(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -14092,7 +14092,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1541::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1540::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14100,7 +14100,7 @@ mod __parse__Top { (4, 200) } 570 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter => ActionFn(1542); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter => ActionFn(1541); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant81(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -14110,7 +14110,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1542::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1541::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14118,7 +14118,7 @@ mod __parse__Top { (6, 200) } 571 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter => ActionFn(1543); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter => ActionFn(1542); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant81(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -14129,7 +14129,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1543::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1542::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14137,14 +14137,14 @@ mod __parse__Top { (7, 200) } 572 => { - // ParameterList = OneOrMore>, ",", "*" => ActionFn(1544); + // ParameterList = OneOrMore>, ",", "*" => ActionFn(1543); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1544::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1543::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14152,7 +14152,7 @@ mod __parse__Top { (3, 200) } 573 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1545); + // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1544); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -14161,7 +14161,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1545::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1544::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14169,7 +14169,7 @@ mod __parse__Top { (5, 200) } 574 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1546); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1545); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -14179,7 +14179,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1546::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1545::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14187,7 +14187,7 @@ mod __parse__Top { (6, 200) } 575 => { - // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1547); + // ParameterList = OneOrMore>, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1546); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant12(__symbols); let __sym3 = __pop_Variant81(__symbols); @@ -14196,7 +14196,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1547::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1546::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14204,7 +14204,7 @@ mod __parse__Top { (5, 200) } 576 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1548); + // ParameterList = OneOrMore>, ",", "/", ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1547); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant12(__symbols); let __sym5 = __pop_Variant81(__symbols); @@ -14215,7 +14215,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1548::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1547::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14223,7 +14223,7 @@ mod __parse__Top { (7, 200) } 577 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1549); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", StarTypedParameter, ("," >)+ => ActionFn(1548); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant12(__symbols); let __sym6 = __pop_Variant81(__symbols); @@ -14235,7 +14235,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1549::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1548::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14243,7 +14243,7 @@ mod __parse__Top { (8, 200) } 578 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1550); + // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1549); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant12(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -14251,7 +14251,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1550::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1549::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14259,7 +14259,7 @@ mod __parse__Top { (4, 200) } 579 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1551); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1550); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant12(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -14269,7 +14269,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1551::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1550::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14277,7 +14277,7 @@ mod __parse__Top { (6, 200) } 580 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1552); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1551); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant12(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -14288,7 +14288,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1552::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1551::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14296,11 +14296,11 @@ mod __parse__Top { (7, 200) } 581 => { - // ParameterList = OneOrMore> => ActionFn(1553); + // ParameterList = OneOrMore> => ActionFn(1552); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1553::<>(__sym0) { + let __nt = match super::__action1552::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14308,14 +14308,14 @@ mod __parse__Top { (1, 200) } 582 => { - // ParameterList = OneOrMore>, ",", "/" => ActionFn(1554); + // ParameterList = OneOrMore>, ",", "/" => ActionFn(1553); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1554::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1553::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14323,7 +14323,7 @@ mod __parse__Top { (3, 200) } 583 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1555); + // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1554); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant12(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -14331,6 +14331,22 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; + let __nt = match super::__action1554::<>(__sym0, __sym1, __sym2, __sym3) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant44(__nt), __end)); + (4, 200) + } + 584 => { + // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1555); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant9(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant74(__symbols); + let __start = __sym0.0; + let __end = __sym3.2; let __nt = match super::__action1555::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), @@ -14338,24 +14354,8 @@ mod __parse__Top { __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (4, 200) } - 584 => { - // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1556); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant9(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant74(__symbols); - let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1556::<>(__sym0, __sym1, __sym2, __sym3) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant44(__nt), __end)); - (4, 200) - } 585 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1557); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1556); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -14365,7 +14365,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1557::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1556::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14373,7 +14373,7 @@ mod __parse__Top { (6, 200) } 586 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1558); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1557); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -14384,7 +14384,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1558::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1557::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14392,14 +14392,14 @@ mod __parse__Top { (7, 200) } 587 => { - // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1559); + // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1558); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant9(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1559::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1558::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14407,7 +14407,7 @@ mod __parse__Top { (3, 200) } 588 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1560); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1559); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -14416,7 +14416,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1560::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1559::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14424,7 +14424,7 @@ mod __parse__Top { (5, 200) } 589 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1561); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1560); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -14434,7 +14434,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1561::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1560::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14442,7 +14442,7 @@ mod __parse__Top { (6, 200) } 590 => { - // ParameterList = "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1309); + // ParameterList = "*", StarTypedParameter, ",", KwargParameter, "," => ActionFn(1308); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant9(__symbols); @@ -14451,7 +14451,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1309::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1308::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14459,7 +14459,7 @@ mod __parse__Top { (5, 200) } 591 => { - // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1310); + // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1309); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant9(__symbols); @@ -14467,7 +14467,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1310::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1309::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14475,7 +14475,7 @@ mod __parse__Top { (4, 200) } 592 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1311); + // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1310); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -14485,7 +14485,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1311::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1310::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14493,7 +14493,7 @@ mod __parse__Top { (6, 200) } 593 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1312); + // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1311); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant9(__symbols); @@ -14502,7 +14502,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1312::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1311::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14510,14 +14510,14 @@ mod __parse__Top { (5, 200) } 594 => { - // ParameterList = "*", StarTypedParameter, "," => ActionFn(1313); + // ParameterList = "*", StarTypedParameter, "," => ActionFn(1312); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1313::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1312::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14525,13 +14525,13 @@ mod __parse__Top { (3, 200) } 595 => { - // ParameterList = "*", "," => ActionFn(1314); + // ParameterList = "*", "," => ActionFn(1313); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1314::<>(__sym0, __sym1) { + let __nt = match super::__action1313::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14539,7 +14539,7 @@ mod __parse__Top { (2, 200) } 596 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, "," => ActionFn(1315); + // ParameterList = "*", StarTypedParameter, ("," >)+, "," => ActionFn(1314); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant12(__symbols); @@ -14547,7 +14547,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1315::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1314::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14555,14 +14555,14 @@ mod __parse__Top { (4, 200) } 597 => { - // ParameterList = "*", ("," >)+, "," => ActionFn(1316); + // ParameterList = "*", ("," >)+, "," => ActionFn(1315); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant12(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1316::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1315::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14570,7 +14570,7 @@ mod __parse__Top { (3, 200) } 598 => { - // ParameterList = "*", StarTypedParameter, ",", KwargParameter => ActionFn(1317); + // ParameterList = "*", StarTypedParameter, ",", KwargParameter => ActionFn(1316); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant9(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -14578,7 +14578,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1317::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1316::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14586,14 +14586,14 @@ mod __parse__Top { (4, 200) } 599 => { - // ParameterList = "*", ",", KwargParameter => ActionFn(1318); + // ParameterList = "*", ",", KwargParameter => ActionFn(1317); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant9(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1318::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1317::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14601,7 +14601,7 @@ mod __parse__Top { (3, 200) } 600 => { - // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1319); + // ParameterList = "*", StarTypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1318); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -14610,7 +14610,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1319::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1318::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14618,7 +14618,7 @@ mod __parse__Top { (5, 200) } 601 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1320); + // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1319); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant9(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -14626,7 +14626,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1320::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1319::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14634,13 +14634,13 @@ mod __parse__Top { (4, 200) } 602 => { - // ParameterList = "*", StarTypedParameter => ActionFn(1321); + // ParameterList = "*", StarTypedParameter => ActionFn(1320); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1321::<>(__sym0, __sym1) { + let __nt = match super::__action1320::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14648,11 +14648,11 @@ mod __parse__Top { (2, 200) } 603 => { - // ParameterList = "*" => ActionFn(1322); + // ParameterList = "*" => ActionFn(1321); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1322::<>(__sym0) { + let __nt = match super::__action1321::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14660,14 +14660,14 @@ mod __parse__Top { (1, 200) } 604 => { - // ParameterList = "*", StarTypedParameter, ("," >)+ => ActionFn(1323); + // ParameterList = "*", StarTypedParameter, ("," >)+ => ActionFn(1322); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant12(__symbols); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1323::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1322::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14675,13 +14675,13 @@ mod __parse__Top { (3, 200) } 605 => { - // ParameterList = "*", ("," >)+ => ActionFn(1324); + // ParameterList = "*", ("," >)+ => ActionFn(1323); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant12(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1324::<>(__sym0, __sym1) { + let __nt = match super::__action1323::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14695,7 +14695,7 @@ mod __parse__Top { __reduce607(__lookahead_start, __symbols, core::marker::PhantomData::<()>) } 608 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1562); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1561); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -14706,7 +14706,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1562::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1561::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14714,7 +14714,7 @@ mod __parse__Top { (7, 201) } 609 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1563); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1562); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -14727,7 +14727,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1563::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1562::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14735,7 +14735,7 @@ mod __parse__Top { (9, 201) } 610 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1564); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1563); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -14749,7 +14749,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1564::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1563::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14757,7 +14757,7 @@ mod __parse__Top { (10, 201) } 611 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1565); + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter, "," => ActionFn(1564); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -14767,7 +14767,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1565::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1564::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14775,7 +14775,7 @@ mod __parse__Top { (6, 201) } 612 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1566); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter, "," => ActionFn(1565); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant9(__symbols); @@ -14787,7 +14787,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1566::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1565::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14795,7 +14795,7 @@ mod __parse__Top { (8, 201) } 613 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1567); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter, "," => ActionFn(1566); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -14808,7 +14808,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1567::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1566::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14816,7 +14816,7 @@ mod __parse__Top { (9, 201) } 614 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1568); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1567); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant9(__symbols); @@ -14828,7 +14828,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1568::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1567::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14836,7 +14836,7 @@ mod __parse__Top { (8, 201) } 615 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1569); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1568); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -14850,7 +14850,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1569::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1568::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14858,7 +14858,7 @@ mod __parse__Top { (10, 201) } 616 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1570); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1569); assert!(__symbols.len() >= 11); let __sym10 = __pop_Variant0(__symbols); let __sym9 = __pop_Variant9(__symbols); @@ -14873,7 +14873,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym10.2; - let __nt = match super::__action1570::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { + let __nt = match super::__action1569::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9, __sym10) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14881,7 +14881,7 @@ mod __parse__Top { (11, 201) } 617 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1571); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1570); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -14892,7 +14892,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1571::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1570::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14900,7 +14900,7 @@ mod __parse__Top { (7, 201) } 618 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1572); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1571); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant9(__symbols); @@ -14913,7 +14913,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1572::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1571::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14921,7 +14921,7 @@ mod __parse__Top { (9, 201) } 619 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1573); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1572); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant0(__symbols); let __sym8 = __pop_Variant9(__symbols); @@ -14935,7 +14935,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1573::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1572::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14943,7 +14943,7 @@ mod __parse__Top { (10, 201) } 620 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, "," => ActionFn(1574); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, "," => ActionFn(1573); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant81(__symbols); @@ -14952,7 +14952,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1574::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1573::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14960,7 +14960,7 @@ mod __parse__Top { (5, 201) } 621 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, "," => ActionFn(1575); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, "," => ActionFn(1574); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant81(__symbols); @@ -14971,7 +14971,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1575::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1574::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14979,7 +14979,7 @@ mod __parse__Top { (7, 201) } 622 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, "," => ActionFn(1576); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, "," => ActionFn(1575); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant81(__symbols); @@ -14991,7 +14991,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1576::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1575::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -14999,7 +14999,7 @@ mod __parse__Top { (8, 201) } 623 => { - // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1577); + // ParameterList = OneOrMore>, ",", "*", "," => ActionFn(1576); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15007,7 +15007,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1577::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1576::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15015,7 +15015,7 @@ mod __parse__Top { (4, 201) } 624 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1578); + // ParameterList = OneOrMore>, ",", "/", ",", "*", "," => ActionFn(1577); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15025,7 +15025,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1578::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1577::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15033,7 +15033,7 @@ mod __parse__Top { (6, 201) } 625 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1579); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", "," => ActionFn(1578); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -15044,7 +15044,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1579::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1578::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15052,7 +15052,7 @@ mod __parse__Top { (7, 201) } 626 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1580); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1579); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant12(__symbols); @@ -15062,7 +15062,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1580::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1579::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15070,7 +15070,7 @@ mod __parse__Top { (6, 201) } 627 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1581); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1580); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant12(__symbols); @@ -15082,7 +15082,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1581::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1580::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15090,7 +15090,7 @@ mod __parse__Top { (8, 201) } 628 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1582); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, "," => ActionFn(1581); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant0(__symbols); let __sym7 = __pop_Variant12(__symbols); @@ -15103,7 +15103,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1582::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1581::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15111,7 +15111,7 @@ mod __parse__Top { (9, 201) } 629 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1583); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, "," => ActionFn(1582); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -15120,7 +15120,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1583::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1582::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15128,7 +15128,7 @@ mod __parse__Top { (5, 201) } 630 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1584); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, "," => ActionFn(1583); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant12(__symbols); @@ -15139,7 +15139,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1584::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1583::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15147,7 +15147,7 @@ mod __parse__Top { (7, 201) } 631 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1585); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, "," => ActionFn(1584); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant0(__symbols); let __sym6 = __pop_Variant12(__symbols); @@ -15159,7 +15159,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1585::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1584::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15167,13 +15167,13 @@ mod __parse__Top { (8, 201) } 632 => { - // ParameterList = OneOrMore>, "," => ActionFn(1586); + // ParameterList = OneOrMore>, "," => ActionFn(1585); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1586::<>(__sym0, __sym1) { + let __nt = match super::__action1585::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15181,7 +15181,7 @@ mod __parse__Top { (2, 201) } 633 => { - // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1587); + // ParameterList = OneOrMore>, ",", "/", "," => ActionFn(1586); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15189,7 +15189,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1587::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1586::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15197,7 +15197,7 @@ mod __parse__Top { (4, 201) } 634 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1588); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, "," => ActionFn(1587); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant12(__symbols); @@ -15206,7 +15206,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1588::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1587::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15214,7 +15214,7 @@ mod __parse__Top { (5, 201) } 635 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1589); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1588); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15224,7 +15224,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1589::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1588::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15232,7 +15232,7 @@ mod __parse__Top { (6, 201) } 636 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1590); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1589); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -15244,7 +15244,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1590::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1589::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15252,7 +15252,7 @@ mod __parse__Top { (8, 201) } 637 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1591); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ",", KwargParameter => ActionFn(1590); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -15265,7 +15265,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1591::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1590::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15273,7 +15273,7 @@ mod __parse__Top { (9, 201) } 638 => { - // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1592); + // ParameterList = OneOrMore>, ",", "*", ",", KwargParameter => ActionFn(1591); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -15282,7 +15282,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1592::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1591::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15290,7 +15290,7 @@ mod __parse__Top { (5, 201) } 639 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1593); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ",", KwargParameter => ActionFn(1592); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant9(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -15301,7 +15301,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1593::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1592::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15309,7 +15309,7 @@ mod __parse__Top { (7, 201) } 640 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1594); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ",", KwargParameter => ActionFn(1593); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -15321,7 +15321,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1594::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1593::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15329,7 +15329,7 @@ mod __parse__Top { (8, 201) } 641 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1595); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1594); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant9(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -15340,7 +15340,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1595::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1594::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15348,7 +15348,7 @@ mod __parse__Top { (7, 201) } 642 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1596); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1595); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -15361,7 +15361,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1596::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1595::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15369,7 +15369,7 @@ mod __parse__Top { (9, 201) } 643 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1597); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1596); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant9(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -15383,7 +15383,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = match super::__action1597::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { + let __nt = match super::__action1596::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15391,7 +15391,7 @@ mod __parse__Top { (10, 201) } 644 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1598); + // ParameterList = OneOrMore>, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1597); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15401,7 +15401,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1598::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1597::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15409,7 +15409,7 @@ mod __parse__Top { (6, 201) } 645 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1599); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1598); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant9(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -15421,7 +15421,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1599::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1598::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15429,7 +15429,7 @@ mod __parse__Top { (8, 201) } 646 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1600); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+, ",", KwargParameter => ActionFn(1599); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant9(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -15442,7 +15442,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = match super::__action1600::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { + let __nt = match super::__action1599::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15450,7 +15450,7 @@ mod __parse__Top { (9, 201) } 647 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter => ActionFn(1601); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter => ActionFn(1600); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant81(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15458,7 +15458,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1601::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1600::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15466,7 +15466,7 @@ mod __parse__Top { (4, 201) } 648 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter => ActionFn(1602); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter => ActionFn(1601); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant81(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15476,7 +15476,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1602::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1601::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15484,7 +15484,7 @@ mod __parse__Top { (6, 201) } 649 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter => ActionFn(1603); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter => ActionFn(1602); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant81(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -15495,7 +15495,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1603::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1602::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15503,14 +15503,14 @@ mod __parse__Top { (7, 201) } 650 => { - // ParameterList = OneOrMore>, ",", "*" => ActionFn(1604); + // ParameterList = OneOrMore>, ",", "*" => ActionFn(1603); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1604::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1603::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15518,7 +15518,7 @@ mod __parse__Top { (3, 201) } 651 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1605); + // ParameterList = OneOrMore>, ",", "/", ",", "*" => ActionFn(1604); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -15527,7 +15527,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1605::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1604::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15535,7 +15535,7 @@ mod __parse__Top { (5, 201) } 652 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1606); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*" => ActionFn(1605); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15545,7 +15545,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1606::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1605::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15553,7 +15553,7 @@ mod __parse__Top { (6, 201) } 653 => { - // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+ => ActionFn(1607); + // ParameterList = OneOrMore>, ",", "*", UntypedParameter, ("," >)+ => ActionFn(1606); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant12(__symbols); let __sym3 = __pop_Variant81(__symbols); @@ -15562,7 +15562,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1607::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1606::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15570,7 +15570,7 @@ mod __parse__Top { (5, 201) } 654 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+ => ActionFn(1608); + // ParameterList = OneOrMore>, ",", "/", ",", "*", UntypedParameter, ("," >)+ => ActionFn(1607); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant12(__symbols); let __sym5 = __pop_Variant81(__symbols); @@ -15581,7 +15581,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1608::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1607::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15589,7 +15589,7 @@ mod __parse__Top { (7, 201) } 655 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+ => ActionFn(1609); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", UntypedParameter, ("," >)+ => ActionFn(1608); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant12(__symbols); let __sym6 = __pop_Variant81(__symbols); @@ -15601,7 +15601,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = match super::__action1609::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { + let __nt = match super::__action1608::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15609,7 +15609,7 @@ mod __parse__Top { (8, 201) } 656 => { - // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1610); + // ParameterList = OneOrMore>, ",", "*", ("," >)+ => ActionFn(1609); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant12(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15617,7 +15617,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1610::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1609::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15625,7 +15625,7 @@ mod __parse__Top { (4, 201) } 657 => { - // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1611); + // ParameterList = OneOrMore>, ",", "/", ",", "*", ("," >)+ => ActionFn(1610); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant12(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15635,7 +15635,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1611::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1610::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15643,7 +15643,7 @@ mod __parse__Top { (6, 201) } 658 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1612); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", "*", ("," >)+ => ActionFn(1611); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant12(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -15654,7 +15654,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1612::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1611::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15662,11 +15662,11 @@ mod __parse__Top { (7, 201) } 659 => { - // ParameterList = OneOrMore> => ActionFn(1613); + // ParameterList = OneOrMore> => ActionFn(1612); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1613::<>(__sym0) { + let __nt = match super::__action1612::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15674,14 +15674,14 @@ mod __parse__Top { (1, 201) } 660 => { - // ParameterList = OneOrMore>, ",", "/" => ActionFn(1614); + // ParameterList = OneOrMore>, ",", "/" => ActionFn(1613); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1614::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1613::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15689,7 +15689,7 @@ mod __parse__Top { (3, 201) } 661 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1615); + // ParameterList = OneOrMore>, ",", "/", ("," >)+ => ActionFn(1614); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant12(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15697,6 +15697,22 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym3.2; + let __nt = match super::__action1614::<>(__sym0, __sym1, __sym2, __sym3) { + Ok(v) => v, + Err(e) => return Some(Err(e)), + }; + __symbols.push((__start, __Symbol::Variant44(__nt), __end)); + (4, 201) + } + 662 => { + // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1615); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant9(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant74(__symbols); + let __start = __sym0.0; + let __end = __sym3.2; let __nt = match super::__action1615::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), @@ -15704,24 +15720,8 @@ mod __parse__Top { __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (4, 201) } - 662 => { - // ParameterList = OneOrMore>, ",", KwargParameter, "," => ActionFn(1616); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant9(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant74(__symbols); - let __start = __sym0.0; - let __end = __sym3.2; - let __nt = match super::__action1616::<>(__sym0, __sym1, __sym2, __sym3) { - Ok(v) => v, - Err(e) => return Some(Err(e)), - }; - __symbols.push((__start, __Symbol::Variant44(__nt), __end)); - (4, 201) - } 663 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1617); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter, "," => ActionFn(1616); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -15731,7 +15731,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1617::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1616::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15739,7 +15739,7 @@ mod __parse__Top { (6, 201) } 664 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1618); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter, "," => ActionFn(1617); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant9(__symbols); @@ -15750,7 +15750,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = match super::__action1618::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { + let __nt = match super::__action1617::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15758,14 +15758,14 @@ mod __parse__Top { (7, 201) } 665 => { - // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1619); + // ParameterList = OneOrMore>, ",", KwargParameter => ActionFn(1618); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant9(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1619::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1618::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15773,7 +15773,7 @@ mod __parse__Top { (3, 201) } 666 => { - // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1620); + // ParameterList = OneOrMore>, ",", "/", ",", KwargParameter => ActionFn(1619); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -15782,7 +15782,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1620::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1619::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15790,7 +15790,7 @@ mod __parse__Top { (5, 201) } 667 => { - // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1621); + // ParameterList = OneOrMore>, ",", "/", ("," >)+, ",", KwargParameter => ActionFn(1620); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant9(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -15800,7 +15800,7 @@ mod __parse__Top { let __sym0 = __pop_Variant74(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1621::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1620::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15808,7 +15808,7 @@ mod __parse__Top { (6, 201) } 668 => { - // ParameterList = "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1347); + // ParameterList = "*", UntypedParameter, ",", KwargParameter, "," => ActionFn(1346); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant9(__symbols); @@ -15817,7 +15817,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1347::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1346::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15825,7 +15825,7 @@ mod __parse__Top { (5, 201) } 669 => { - // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1348); + // ParameterList = "*", ",", KwargParameter, "," => ActionFn(1347); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant9(__symbols); @@ -15833,7 +15833,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1348::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1347::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15841,7 +15841,7 @@ mod __parse__Top { (4, 201) } 670 => { - // ParameterList = "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1349); + // ParameterList = "*", UntypedParameter, ("," >)+, ",", KwargParameter, "," => ActionFn(1348); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant9(__symbols); @@ -15851,7 +15851,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = match super::__action1349::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { + let __nt = match super::__action1348::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15859,7 +15859,7 @@ mod __parse__Top { (6, 201) } 671 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1350); + // ParameterList = "*", ("," >)+, ",", KwargParameter, "," => ActionFn(1349); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant9(__symbols); @@ -15868,7 +15868,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1350::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1349::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15876,14 +15876,14 @@ mod __parse__Top { (5, 201) } 672 => { - // ParameterList = "*", UntypedParameter, "," => ActionFn(1351); + // ParameterList = "*", UntypedParameter, "," => ActionFn(1350); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1351::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1350::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15891,13 +15891,13 @@ mod __parse__Top { (3, 201) } 673 => { - // ParameterList = "*", "," => ActionFn(1352); + // ParameterList = "*", "," => ActionFn(1351); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1352::<>(__sym0, __sym1) { + let __nt = match super::__action1351::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15905,7 +15905,7 @@ mod __parse__Top { (2, 201) } 674 => { - // ParameterList = "*", UntypedParameter, ("," >)+, "," => ActionFn(1353); + // ParameterList = "*", UntypedParameter, ("," >)+, "," => ActionFn(1352); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant12(__symbols); @@ -15913,7 +15913,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1353::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1352::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15921,14 +15921,14 @@ mod __parse__Top { (4, 201) } 675 => { - // ParameterList = "*", ("," >)+, "," => ActionFn(1354); + // ParameterList = "*", ("," >)+, "," => ActionFn(1353); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant12(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1354::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1353::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15936,7 +15936,7 @@ mod __parse__Top { (3, 201) } 676 => { - // ParameterList = "*", UntypedParameter, ",", KwargParameter => ActionFn(1355); + // ParameterList = "*", UntypedParameter, ",", KwargParameter => ActionFn(1354); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant9(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15944,7 +15944,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1355::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1354::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15952,14 +15952,14 @@ mod __parse__Top { (4, 201) } 677 => { - // ParameterList = "*", ",", KwargParameter => ActionFn(1356); + // ParameterList = "*", ",", KwargParameter => ActionFn(1355); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant9(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1356::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1355::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15967,7 +15967,7 @@ mod __parse__Top { (3, 201) } 678 => { - // ParameterList = "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1357); + // ParameterList = "*", UntypedParameter, ("," >)+, ",", KwargParameter => ActionFn(1356); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant9(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -15976,7 +15976,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = match super::__action1357::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { + let __nt = match super::__action1356::<>(__sym0, __sym1, __sym2, __sym3, __sym4) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -15984,7 +15984,7 @@ mod __parse__Top { (5, 201) } 679 => { - // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1358); + // ParameterList = "*", ("," >)+, ",", KwargParameter => ActionFn(1357); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant9(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -15992,7 +15992,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = match super::__action1358::<>(__sym0, __sym1, __sym2, __sym3) { + let __nt = match super::__action1357::<>(__sym0, __sym1, __sym2, __sym3) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16000,13 +16000,13 @@ mod __parse__Top { (4, 201) } 680 => { - // ParameterList = "*", UntypedParameter => ActionFn(1359); + // ParameterList = "*", UntypedParameter => ActionFn(1358); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1359::<>(__sym0, __sym1) { + let __nt = match super::__action1358::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16014,11 +16014,11 @@ mod __parse__Top { (2, 201) } 681 => { - // ParameterList = "*" => ActionFn(1360); + // ParameterList = "*" => ActionFn(1359); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = match super::__action1360::<>(__sym0) { + let __nt = match super::__action1359::<>(__sym0) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16026,14 +16026,14 @@ mod __parse__Top { (1, 201) } 682 => { - // ParameterList = "*", UntypedParameter, ("," >)+ => ActionFn(1361); + // ParameterList = "*", UntypedParameter, ("," >)+ => ActionFn(1360); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant12(__symbols); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1361::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1360::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16041,13 +16041,13 @@ mod __parse__Top { (3, 201) } 683 => { - // ParameterList = "*", ("," >)+ => ActionFn(1362); + // ParameterList = "*", ("," >)+ => ActionFn(1361); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant12(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1362::<>(__sym0, __sym1) { + let __nt = match super::__action1361::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16305,14 +16305,14 @@ mod __parse__Top { (2, 204) } 704 => { - // Parameters = "(", ParameterList, ")" => ActionFn(1444); + // Parameters = "(", ParameterList, ")" => ActionFn(1443); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant44(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = match super::__action1444::<>(__sym0, __sym1, __sym2) { + let __nt = match super::__action1443::<>(__sym0, __sym1, __sym2) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -16320,13 +16320,13 @@ mod __parse__Top { (3, 205) } 705 => { - // Parameters = "(", ")" => ActionFn(1445); + // Parameters = "(", ")" => ActionFn(1444); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = match super::__action1445::<>(__sym0, __sym1) { + let __nt = match super::__action1444::<>(__sym0, __sym1) { Ok(v) => v, Err(e) => return Some(Err(e)), }; @@ -19347,13 +19347,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",") = OneOrMore>, "," => ActionFn(1424); + // ( ",") = OneOrMore>, "," => ActionFn(1423); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1424::<>(__sym0, __sym1); + let __nt = super::__action1423::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (2, 65) } @@ -19364,13 +19364,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ( ",")? = OneOrMore>, "," => ActionFn(1427); + // ( ",")? = OneOrMore>, "," => ActionFn(1426); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1427::<>(__sym0, __sym1); + let __nt = super::__action1426::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant39(__nt), __end)); (2, 66) } @@ -19410,11 +19410,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (@L string @R)+ = string => ActionFn(1436); + // (@L string @R)+ = string => ActionFn(1435); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1436::<>(__sym0); + let __nt = super::__action1435::<>(__sym0); __symbols.push((__start, __Symbol::Variant41(__nt), __end)); (1, 68) } @@ -19425,13 +19425,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (@L string @R)+ = (@L string @R)+, string => ActionFn(1437); + // (@L string @R)+ = (@L string @R)+, string => ActionFn(1436); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant41(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1437::<>(__sym0, __sym1); + let __nt = super::__action1436::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant41(__nt), __end)); (2, 68) } @@ -19459,13 +19459,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (CompOp Expression<"all">)+ = CompOp, Expression<"all"> => ActionFn(1438); + // (CompOp Expression<"all">)+ = CompOp, Expression<"all"> => ActionFn(1437); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant53(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1438::<>(__sym0, __sym1); + let __nt = super::__action1437::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant43(__nt), __end)); (2, 70) } @@ -19476,14 +19476,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (CompOp Expression<"all">)+ = (CompOp Expression<"all">)+, CompOp, Expression<"all"> => ActionFn(1439); + // (CompOp Expression<"all">)+ = (CompOp Expression<"all">)+, CompOp, Expression<"all"> => ActionFn(1438); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant53(__symbols); let __sym0 = __pop_Variant43(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1439::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1438::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant43(__nt), __end)); (3, 70) } @@ -19509,11 +19509,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (Guard)? = Guard => ActionFn(1440); + // (Guard)? = Guard => ActionFn(1439); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1440::<>(__sym0); + let __nt = super::__action1439::<>(__sym0); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (1, 72) } @@ -19553,11 +19553,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // (ParameterList)? = ParameterList => ActionFn(1443); + // (ParameterList)? = ParameterList => ActionFn(1442); let __sym0 = __pop_Variant44(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1443::<>(__sym0); + let __nt = super::__action1442::<>(__sym0); __symbols.push((__start, __Symbol::Variant45(__nt), __end)); (1, 74) } @@ -20027,14 +20027,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "[", ListLiteralValues, "]" => ActionFn(1498); + // Atom<"all"> = "[", ListLiteralValues, "]" => ActionFn(1497); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant31(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1498::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1497::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 92) } @@ -20045,13 +20045,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "[", "]" => ActionFn(1499); + // Atom<"all"> = "[", "]" => ActionFn(1498); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1499::<>(__sym0, __sym1); + let __nt = super::__action1498::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 92) } @@ -20172,14 +20172,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", DictLiteralValues, "}" => ActionFn(1484); + // Atom<"all"> = "{", DictLiteralValues, "}" => ActionFn(1483); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant57(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1484::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1483::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 92) } @@ -20190,13 +20190,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"all"> = "{", "}" => ActionFn(1485); + // Atom<"all"> = "{", "}" => ActionFn(1484); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1485::<>(__sym0, __sym1); + let __nt = super::__action1484::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 92) } @@ -20353,14 +20353,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "[", ListLiteralValues, "]" => ActionFn(1500); + // Atom<"no-withitems"> = "[", ListLiteralValues, "]" => ActionFn(1499); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant31(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1500::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1499::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 93) } @@ -20371,13 +20371,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "[", "]" => ActionFn(1501); + // Atom<"no-withitems"> = "[", "]" => ActionFn(1500); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1501::<>(__sym0, __sym1); + let __nt = super::__action1500::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 93) } @@ -20461,14 +20461,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", DictLiteralValues, "}" => ActionFn(1486); + // Atom<"no-withitems"> = "{", DictLiteralValues, "}" => ActionFn(1485); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant57(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1486::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1485::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 93) } @@ -20479,13 +20479,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Atom<"no-withitems"> = "{", "}" => ActionFn(1487); + // Atom<"no-withitems"> = "{", "}" => ActionFn(1486); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1487::<>(__sym0, __sym1); + let __nt = super::__action1486::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 93) } @@ -21028,7 +21028,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, "(", ArgumentList, ")", ":", Suite => ActionFn(1472); + // ClassDef = "class", Identifier, "(", ArgumentList, ")", ":", Suite => ActionFn(1471); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -21039,7 +21039,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1472::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1471::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 100) } @@ -21050,7 +21050,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, "(", ArgumentList, ")", ":", Suite => ActionFn(1473); + // ClassDef = Decorator+, "class", Identifier, "(", ArgumentList, ")", ":", Suite => ActionFn(1472); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant25(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -21062,7 +21062,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1473::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1472::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (8, 100) } @@ -21073,7 +21073,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = "class", Identifier, ":", Suite => ActionFn(1474); + // ClassDef = "class", Identifier, ":", Suite => ActionFn(1473); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant25(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -21081,7 +21081,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1474::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1473::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (4, 100) } @@ -21092,7 +21092,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ClassDef = Decorator+, "class", Identifier, ":", Suite => ActionFn(1475); + // ClassDef = Decorator+, "class", Identifier, ":", Suite => ActionFn(1474); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant25(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -21101,7 +21101,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1475::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1474::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (5, 100) } @@ -21495,11 +21495,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = FunctionArgument => ActionFn(1450); + // Comma = FunctionArgument => ActionFn(1449); let __sym0 = __pop_Variant29(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1450::<>(__sym0); + let __nt = super::__action1449::<>(__sym0); __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (1, 103) } @@ -21510,10 +21510,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = => ActionFn(1451); + // Comma = => ActionFn(1450); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action1451::<>(&__start, &__end); + let __nt = super::__action1450::<>(&__start, &__end); __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (0, 103) } @@ -21524,13 +21524,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+, FunctionArgument => ActionFn(1452); + // Comma = ( ",")+, FunctionArgument => ActionFn(1451); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant29(__symbols); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1452::<>(__sym0, __sym1); + let __nt = super::__action1451::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (2, 103) } @@ -21541,11 +21541,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+ => ActionFn(1453); + // Comma = ( ",")+ => ActionFn(1452); let __sym0 = __pop_Variant30(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1453::<>(__sym0); + let __nt = super::__action1452::<>(__sym0); __symbols.push((__start, __Symbol::Variant49(__nt), __end)); (1, 103) } @@ -21556,11 +21556,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = Pattern => ActionFn(1458); + // Comma = Pattern => ActionFn(1457); let __sym0 = __pop_Variant33(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1458::<>(__sym0); + let __nt = super::__action1457::<>(__sym0); __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 104) } @@ -21571,10 +21571,10 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = => ActionFn(1459); + // Comma = => ActionFn(1458); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2.clone())).unwrap_or_default(); let __end = __start.clone(); - let __nt = super::__action1459::<>(&__start, &__end); + let __nt = super::__action1458::<>(&__start, &__end); __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (0, 104) } @@ -21585,13 +21585,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+, Pattern => ActionFn(1460); + // Comma = ( ",")+, Pattern => ActionFn(1459); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant33(__symbols); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1460::<>(__sym0, __sym1); + let __nt = super::__action1459::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (2, 104) } @@ -21602,11 +21602,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Comma = ( ",")+ => ActionFn(1461); + // Comma = ( ",")+ => ActionFn(1460); let __sym0 = __pop_Variant34(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1461::<>(__sym0); + let __nt = super::__action1460::<>(__sym0); __symbols.push((__start, __Symbol::Variant50(__nt), __end)); (1, 104) } @@ -22408,7 +22408,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptClause = "except", Test<"all">, ":", Suite => ActionFn(1626); + // ExceptClause = "except", Test<"all">, ":", Suite => ActionFn(1625); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant25(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -22416,7 +22416,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1626::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1625::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant59(__nt), __end)); (4, 126) } @@ -22427,14 +22427,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExceptClause = "except", ":", Suite => ActionFn(1627); + // ExceptClause = "except", ":", Suite => ActionFn(1626); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant25(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1627::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1626::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant59(__nt), __end)); (3, 126) } @@ -22730,11 +22730,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList => ActionFn(1651); + // ExpressionStatement = GenericList => ActionFn(1650); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1651::<>(__sym0); + let __nt = super::__action1650::<>(__sym0); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (1, 136) } @@ -22745,13 +22745,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList, AssignSuffix+ => ActionFn(1652); + // ExpressionStatement = GenericList, AssignSuffix+ => ActionFn(1651); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant17(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1652::<>(__sym0, __sym1); + let __nt = super::__action1651::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (2, 136) } @@ -22762,14 +22762,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = GenericList, AugAssign, TestListOrYieldExpr => ActionFn(1653); + // ExpressionStatement = GenericList, AugAssign, TestListOrYieldExpr => ActionFn(1652); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1653::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1652::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (3, 136) } @@ -22780,7 +22780,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = Test<"all">, ":", Test<"all">, AssignSuffix => ActionFn(1448); + // ExpressionStatement = Test<"all">, ":", Test<"all">, AssignSuffix => ActionFn(1447); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant15(__symbols); let __sym2 = __pop_Variant15(__symbols); @@ -22788,7 +22788,7 @@ mod __parse__Top { let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1448::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1447::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (4, 136) } @@ -22799,14 +22799,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ExpressionStatement = Test<"all">, ":", Test<"all"> => ActionFn(1449); + // ExpressionStatement = Test<"all">, ":", Test<"all"> => ActionFn(1448); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1449::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1448::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (3, 136) } @@ -22911,13 +22911,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "return", GenericList => ActionFn(1647); + // FlowStatement = "return", GenericList => ActionFn(1646); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1647::<>(__sym0, __sym1); + let __nt = super::__action1646::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (2, 139) } @@ -22928,11 +22928,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FlowStatement = "return" => ActionFn(1648); + // FlowStatement = "return" => ActionFn(1647); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1648::<>(__sym0); + let __nt = super::__action1647::<>(__sym0); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (1, 139) } @@ -22973,7 +22973,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1638); + // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1637); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant25(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -22987,7 +22987,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1638::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1637::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (10, 140) } @@ -22998,7 +22998,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1639); + // ForStatement = "async", "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1638); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -23009,7 +23009,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1639::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1638::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 140) } @@ -23020,7 +23020,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1640); + // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite, "else", ":", Suite => ActionFn(1639); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant25(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -23033,7 +23033,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1640::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1639::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (9, 140) } @@ -23044,7 +23044,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1641); + // ForStatement = "for", ExpressionList, "in", GenericList, ":", Suite => ActionFn(1640); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant25(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -23054,7 +23054,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1641::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1640::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (6, 140) } @@ -23065,7 +23065,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1476); + // FuncDef = "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1475); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant25(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -23077,7 +23077,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1476::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1475::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (8, 141) } @@ -23088,7 +23088,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1477); + // FuncDef = Decorator+, "async", "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1476); assert!(__symbols.len() >= 9); let __sym8 = __pop_Variant25(__symbols); let __sym7 = __pop_Variant0(__symbols); @@ -23101,7 +23101,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym8.2; - let __nt = super::__action1477::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); + let __nt = super::__action1476::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (9, 141) } @@ -23112,7 +23112,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1478); + // FuncDef = "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1477); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant25(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -23122,7 +23122,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1478::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1477::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (6, 141) } @@ -23133,7 +23133,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1479); + // FuncDef = Decorator+, "async", "def", Identifier, Parameters, ":", Suite => ActionFn(1478); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -23144,7 +23144,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1479::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1478::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 141) } @@ -23155,7 +23155,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1480); + // FuncDef = "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1479); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -23166,7 +23166,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1480::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1479::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 141) } @@ -23177,7 +23177,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1481); + // FuncDef = Decorator+, "def", Identifier, Parameters, "->", Test<"all">, ":", Suite => ActionFn(1480); assert!(__symbols.len() >= 8); let __sym7 = __pop_Variant25(__symbols); let __sym6 = __pop_Variant0(__symbols); @@ -23189,7 +23189,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym7.2; - let __nt = super::__action1481::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); + let __nt = super::__action1480::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (8, 141) } @@ -23200,7 +23200,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = "def", Identifier, Parameters, ":", Suite => ActionFn(1482); + // FuncDef = "def", Identifier, Parameters, ":", Suite => ActionFn(1481); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant25(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -23209,7 +23209,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1482::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1481::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (5, 141) } @@ -23220,7 +23220,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FuncDef = Decorator+, "def", Identifier, Parameters, ":", Suite => ActionFn(1483); + // FuncDef = Decorator+, "def", Identifier, Parameters, ":", Suite => ActionFn(1482); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant25(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -23230,7 +23230,7 @@ mod __parse__Top { let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1483::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1482::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (6, 141) } @@ -23241,13 +23241,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = NamedExpressionTest, CompFor => ActionFn(1466); + // FunctionArgument = NamedExpressionTest, CompFor => ActionFn(1465); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant51(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1466::<>(__sym0, __sym1); + let __nt = super::__action1465::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant29(__nt), __end)); (2, 142) } @@ -23258,11 +23258,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // FunctionArgument = NamedExpressionTest => ActionFn(1467); + // FunctionArgument = NamedExpressionTest => ActionFn(1466); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1467::<>(__sym0); + let __nt = super::__action1466::<>(__sym0); __symbols.push((__start, __Symbol::Variant29(__nt), __end)); (1, 142) } @@ -23775,11 +23775,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportFromLocation = DottedName => ActionFn(1496); + // ImportFromLocation = DottedName => ActionFn(1495); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1496::<>(__sym0); + let __nt = super::__action1495::<>(__sym0); __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (1, 156) } @@ -23790,13 +23790,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ImportFromLocation = ImportDots+, DottedName => ActionFn(1497); + // ImportFromLocation = ImportDots+, DottedName => ActionFn(1496); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant23(__symbols); let __sym0 = __pop_Variant65(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1497::<>(__sym0, __sym1); + let __nt = super::__action1496::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant66(__nt), __end)); (2, 156) } @@ -23858,13 +23858,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**", TypedParameter => ActionFn(1654); + // KwargParameter = "**", TypedParameter => ActionFn(1653); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant81(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1654::<>(__sym0, __sym1); + let __nt = super::__action1653::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (2, 158) } @@ -23875,11 +23875,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // KwargParameter = "**" => ActionFn(1655); + // KwargParameter = "**" => ActionFn(1654); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1655::<>(__sym0); + let __nt = super::__action1654::<>(__sym0); __symbols.push((__start, __Symbol::Variant9(__nt), __end)); (1, 158) } @@ -24284,7 +24284,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchCase = "case", Patterns, Guard, ":", Suite => ActionFn(1441); + // MatchCase = "case", Patterns, Guard, ":", Suite => ActionFn(1440); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant25(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -24293,7 +24293,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1441::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1440::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (5, 166) } @@ -24304,7 +24304,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchCase = "case", Patterns, ":", Suite => ActionFn(1442); + // MatchCase = "case", Patterns, ":", Suite => ActionFn(1441); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant25(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -24312,7 +24312,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1442::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1441::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant67(__nt), __end)); (4, 166) } @@ -24391,11 +24391,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchName = Identifier => ActionFn(1279); + // MatchName = Identifier => ActionFn(1278); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1279::<>(__sym0); + let __nt = super::__action1278::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 170) } @@ -24406,14 +24406,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchNameOrAttr = MatchName, ".", Identifier => ActionFn(1280); + // MatchNameOrAttr = MatchName, ".", Identifier => ActionFn(1279); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1280::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1279::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 171) } @@ -24424,14 +24424,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // MatchNameOrAttr = MatchNameOrAttr, ".", Identifier => ActionFn(1281); + // MatchNameOrAttr = MatchNameOrAttr, ".", Identifier => ActionFn(1280); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1281::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1280::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 171) } @@ -24607,14 +24607,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NamedExpression = Identifier, ":=", Test<"all"> => ActionFn(1282); + // NamedExpression = Identifier, ":=", Test<"all"> => ActionFn(1281); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1282::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1281::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 174) } @@ -24685,13 +24685,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NonlocalStatement = "nonlocal", OneOrMore => ActionFn(1283); + // NonlocalStatement = "nonlocal", OneOrMore => ActionFn(1282); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant71(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1283::<>(__sym0, __sym1); + let __nt = super::__action1282::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (2, 177) } @@ -24702,13 +24702,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NotTest<"all"> = "not", NotTest<"all"> => ActionFn(1284); + // NotTest<"all"> = "not", NotTest<"all"> => ActionFn(1283); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1284::<>(__sym0, __sym1); + let __nt = super::__action1283::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 178) } @@ -24734,13 +24734,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // NotTest<"no-withitems"> = "not", NotTest<"all"> => ActionFn(1285); + // NotTest<"no-withitems"> = "not", NotTest<"all"> => ActionFn(1284); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1285::<>(__sym0, __sym1); + let __nt = super::__action1284::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 179) } @@ -24865,14 +24865,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = DottedName, "as", Identifier => ActionFn(1488); + // OneOrMore> = DottedName, "as", Identifier => ActionFn(1487); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1488::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1487::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (3, 183) } @@ -24883,11 +24883,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = DottedName => ActionFn(1489); + // OneOrMore> = DottedName => ActionFn(1488); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1489::<>(__sym0); + let __nt = super::__action1488::<>(__sym0); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (1, 183) } @@ -24898,7 +24898,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", DottedName, "as", Identifier => ActionFn(1490); + // OneOrMore> = OneOrMore>, ",", DottedName, "as", Identifier => ActionFn(1489); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant23(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -24907,7 +24907,7 @@ mod __parse__Top { let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1490::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1489::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (5, 183) } @@ -24918,14 +24918,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", DottedName => ActionFn(1491); + // OneOrMore> = OneOrMore>, ",", DottedName => ActionFn(1490); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1491::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1490::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (3, 183) } @@ -24936,14 +24936,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = Identifier, "as", Identifier => ActionFn(1492); + // OneOrMore> = Identifier, "as", Identifier => ActionFn(1491); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1492::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1491::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (3, 184) } @@ -24954,11 +24954,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = Identifier => ActionFn(1493); + // OneOrMore> = Identifier => ActionFn(1492); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1493::<>(__sym0); + let __nt = super::__action1492::<>(__sym0); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (1, 184) } @@ -24969,7 +24969,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", Identifier, "as", Identifier => ActionFn(1494); + // OneOrMore> = OneOrMore>, ",", Identifier, "as", Identifier => ActionFn(1493); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant23(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -24978,7 +24978,7 @@ mod __parse__Top { let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1494::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1493::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (5, 184) } @@ -24989,14 +24989,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OneOrMore> = OneOrMore>, ",", Identifier => ActionFn(1495); + // OneOrMore> = OneOrMore>, ",", Identifier => ActionFn(1494); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant23(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant63(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1495::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1494::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant63(__nt), __end)); (3, 184) } @@ -25286,11 +25286,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrPattern = TwoOrMore => ActionFn(1286); + // OrPattern = TwoOrMore => ActionFn(1285); let __sym0 = __pop_Variant50(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1286::<>(__sym0); + let __nt = super::__action1285::<>(__sym0); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (1, 193) } @@ -25301,13 +25301,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrTest<"all"> = (> "or")+, AndTest<"all"> => ActionFn(1287); + // OrTest<"all"> = (> "or")+, AndTest<"all"> => ActionFn(1286); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1287::<>(__sym0, __sym1); + let __nt = super::__action1286::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 194) } @@ -25333,13 +25333,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // OrTest<"no-withitems"> = (> "or")+, AndTest<"all"> => ActionFn(1288); + // OrTest<"no-withitems"> = (> "or")+, AndTest<"all"> => ActionFn(1287); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant17(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1288::<>(__sym0, __sym1); + let __nt = super::__action1287::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 195) } @@ -25535,13 +25535,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter, "," => ActionFn(1325); + // ParameterList = KwargParameter, "," => ActionFn(1324); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1325::<>(__sym0, __sym1); + let __nt = super::__action1324::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (2, 200) } @@ -25552,11 +25552,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter => ActionFn(1326); + // ParameterList = KwargParameter => ActionFn(1325); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1326::<>(__sym0); + let __nt = super::__action1325::<>(__sym0); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (1, 200) } @@ -25567,13 +25567,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter, "," => ActionFn(1363); + // ParameterList = KwargParameter, "," => ActionFn(1362); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1363::<>(__sym0, __sym1); + let __nt = super::__action1362::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (2, 201) } @@ -25584,11 +25584,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ParameterList = KwargParameter => ActionFn(1364); + // ParameterList = KwargParameter => ActionFn(1363); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1364::<>(__sym0); + let __nt = super::__action1363::<>(__sym0); __symbols.push((__start, __Symbol::Variant44(__nt), __end)); (1, 201) } @@ -25628,11 +25628,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // PassStatement = "pass" => ActionFn(1366); + // PassStatement = "pass" => ActionFn(1365); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1366::<>(__sym0); + let __nt = super::__action1365::<>(__sym0); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (1, 206) } @@ -25702,13 +25702,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = Pattern, "," => ActionFn(1367); + // Patterns = Pattern, "," => ActionFn(1366); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant33(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1367::<>(__sym0, __sym1); + let __nt = super::__action1366::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 209) } @@ -25719,13 +25719,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = TwoOrMore, "," => ActionFn(1368); + // Patterns = TwoOrMore, "," => ActionFn(1367); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant50(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1368::<>(__sym0, __sym1); + let __nt = super::__action1367::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 209) } @@ -25736,11 +25736,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Patterns = TwoOrMore => ActionFn(1369); + // Patterns = TwoOrMore => ActionFn(1368); let __sym0 = __pop_Variant50(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1369::<>(__sym0); + let __nt = super::__action1368::<>(__sym0); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (1, 209) } @@ -25766,14 +25766,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Power<"all"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1370); + // Power<"all"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1369); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1370::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1369::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 210) } @@ -25799,14 +25799,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Power<"no-withitems"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1371); + // Power<"no-withitems"> = AtomExpr<"all">, "**", Factor<"all"> => ActionFn(1370); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1371::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1370::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 211) } @@ -25956,11 +25956,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise" => ActionFn(1372); + // RaiseStatement = "raise" => ActionFn(1371); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1372::<>(__sym0); + let __nt = super::__action1371::<>(__sym0); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (1, 213) } @@ -25971,7 +25971,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise", Test<"all">, "from", Test<"all"> => ActionFn(1373); + // RaiseStatement = "raise", Test<"all">, "from", Test<"all"> => ActionFn(1372); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant15(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -25979,7 +25979,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1373::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1372::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (4, 213) } @@ -25990,13 +25990,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // RaiseStatement = "raise", Test<"all"> => ActionFn(1374); + // RaiseStatement = "raise", Test<"all"> => ActionFn(1373); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1374::<>(__sym0, __sym1); + let __nt = super::__action1373::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (2, 213) } @@ -26007,14 +26007,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", Pattern, ")" => ActionFn(1375); + // SequencePattern = "(", Pattern, ")" => ActionFn(1374); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant33(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1375::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1374::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (3, 214) } @@ -26025,13 +26025,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ")" => ActionFn(1376); + // SequencePattern = "(", ")" => ActionFn(1375); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1376::<>(__sym0, __sym1); + let __nt = super::__action1375::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 214) } @@ -26042,7 +26042,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", Pattern, ",", ")" => ActionFn(1377); + // SequencePattern = "(", Pattern, ",", ")" => ActionFn(1376); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -26050,7 +26050,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1377::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1376::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (4, 214) } @@ -26061,7 +26061,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ( ",")+, Pattern, ",", ")" => ActionFn(1378); + // SequencePattern = "(", ( ",")+, Pattern, ",", ")" => ActionFn(1377); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -26070,7 +26070,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1378::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1377::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (5, 214) } @@ -26081,7 +26081,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "(", ( ",")+, Pattern, ")" => ActionFn(1379); + // SequencePattern = "(", ( ",")+, Pattern, ")" => ActionFn(1378); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant33(__symbols); @@ -26089,7 +26089,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1379::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1378::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (4, 214) } @@ -26100,14 +26100,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", Pattern, "]" => ActionFn(1462); + // SequencePattern = "[", Pattern, "]" => ActionFn(1461); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant33(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1462::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1461::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (3, 214) } @@ -26118,13 +26118,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", "]" => ActionFn(1463); + // SequencePattern = "[", "]" => ActionFn(1462); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1463::<>(__sym0, __sym1); + let __nt = super::__action1462::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 214) } @@ -26135,7 +26135,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", ( ",")+, Pattern, "]" => ActionFn(1464); + // SequencePattern = "[", ( ",")+, Pattern, "]" => ActionFn(1463); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant33(__symbols); @@ -26143,7 +26143,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1464::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1463::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (4, 214) } @@ -26154,14 +26154,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SequencePattern = "[", ( ",")+, "]" => ActionFn(1465); + // SequencePattern = "[", ( ",")+, "]" => ActionFn(1464); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant34(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1465::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1464::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (3, 214) } @@ -26204,14 +26204,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ShiftExpression<"all"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1381); + // ShiftExpression<"all"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1380); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1381::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1380::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 216) } @@ -26237,14 +26237,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ShiftExpression<"no-withitems"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1382); + // ShiftExpression<"no-withitems"> = ShiftExpression<"all">, ShiftOp, ArithmeticExpression<"all"> => ActionFn(1381); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1382::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1381::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 217) } @@ -26300,7 +26300,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1468); + // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1467); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant15(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -26309,7 +26309,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1468::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1467::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant77(__nt), __end)); (5, 219) } @@ -26320,7 +26320,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1469); + // SingleForComprehension = "async", "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1468); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant17(__symbols); let __sym4 = __pop_Variant15(__symbols); @@ -26330,7 +26330,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1469::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1468::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant77(__nt), __end)); (6, 219) } @@ -26341,7 +26341,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1470); + // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all"> => ActionFn(1469); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant15(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -26349,7 +26349,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1470::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1469::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant77(__nt), __end)); (4, 219) } @@ -26360,7 +26360,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1471); + // SingleForComprehension = "for", ExpressionList, "in", OrTest<"all">, ComprehensionIf+ => ActionFn(1470); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant17(__symbols); let __sym3 = __pop_Variant15(__symbols); @@ -26369,7 +26369,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1471::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1470::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant77(__nt), __end)); (5, 219) } @@ -26412,13 +26412,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SliceOp = ":", Test<"all"> => ActionFn(1628); + // SliceOp = ":", Test<"all"> => ActionFn(1627); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1628::<>(__sym0, __sym1); + let __nt = super::__action1627::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant79(__nt), __end)); (2, 221) } @@ -26429,11 +26429,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SliceOp = ":" => ActionFn(1629); + // SliceOp = ":" => ActionFn(1628); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1629::<>(__sym0); + let __nt = super::__action1628::<>(__sym0); __symbols.push((__start, __Symbol::Variant79(__nt), __end)); (1, 221) } @@ -26593,13 +26593,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarExpr = "*", Expression<"all"> => ActionFn(1385); + // StarExpr = "*", Expression<"all"> => ActionFn(1384); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1385::<>(__sym0, __sym1); + let __nt = super::__action1384::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 224) } @@ -26610,13 +26610,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarPattern = "*", Identifier => ActionFn(1386); + // StarPattern = "*", Identifier => ActionFn(1385); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant23(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1386::<>(__sym0, __sym1); + let __nt = super::__action1385::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (2, 225) } @@ -26627,14 +26627,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarTypedParameter = Identifier, ":", TestOrStarExpr => ActionFn(1387); + // StarTypedParameter = Identifier, ":", TestOrStarExpr => ActionFn(1386); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1387::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1386::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (3, 226) } @@ -26645,11 +26645,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // StarTypedParameter = Identifier => ActionFn(1388); + // StarTypedParameter = Identifier => ActionFn(1387); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1388::<>(__sym0); + let __nt = super::__action1387::<>(__sym0); __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (1, 226) } @@ -26884,7 +26884,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", Test<"all">, SliceOp => ActionFn(1630); + // Subscript = Test<"all">, ":", Test<"all">, SliceOp => ActionFn(1629); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant79(__symbols); let __sym2 = __pop_Variant15(__symbols); @@ -26892,7 +26892,7 @@ mod __parse__Top { let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1630::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1629::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (4, 229) } @@ -26903,14 +26903,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", SliceOp => ActionFn(1631); + // Subscript = Test<"all">, ":", SliceOp => ActionFn(1630); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant79(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1631::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1630::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 229) } @@ -26921,14 +26921,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", Test<"all">, SliceOp => ActionFn(1632); + // Subscript = ":", Test<"all">, SliceOp => ActionFn(1631); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant79(__symbols); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1632::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1631::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 229) } @@ -26939,13 +26939,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", SliceOp => ActionFn(1633); + // Subscript = ":", SliceOp => ActionFn(1632); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant79(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1633::<>(__sym0, __sym1); + let __nt = super::__action1632::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 229) } @@ -26956,14 +26956,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":", Test<"all"> => ActionFn(1634); + // Subscript = Test<"all">, ":", Test<"all"> => ActionFn(1633); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1634::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1633::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 229) } @@ -26974,13 +26974,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = Test<"all">, ":" => ActionFn(1635); + // Subscript = Test<"all">, ":" => ActionFn(1634); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1635::<>(__sym0, __sym1); + let __nt = super::__action1634::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 229) } @@ -26991,13 +26991,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":", Test<"all"> => ActionFn(1636); + // Subscript = ":", Test<"all"> => ActionFn(1635); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1636::<>(__sym0, __sym1); + let __nt = super::__action1635::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 229) } @@ -27008,11 +27008,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Subscript = ":" => ActionFn(1637); + // Subscript = ":" => ActionFn(1636); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1637::<>(__sym0); + let __nt = super::__action1636::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 229) } @@ -27023,11 +27023,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = Subscript => ActionFn(1390); + // SubscriptList = Subscript => ActionFn(1389); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1390::<>(__sym0); + let __nt = super::__action1389::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 230) } @@ -27038,13 +27038,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = Subscript, "," => ActionFn(1391); + // SubscriptList = Subscript, "," => ActionFn(1390); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1391::<>(__sym0, __sym1); + let __nt = super::__action1390::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 230) } @@ -27055,13 +27055,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = TwoOrMore, "," => ActionFn(1392); + // SubscriptList = TwoOrMore, "," => ActionFn(1391); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1392::<>(__sym0, __sym1); + let __nt = super::__action1391::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 230) } @@ -27072,11 +27072,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // SubscriptList = TwoOrMore => ActionFn(1393); + // SubscriptList = TwoOrMore => ActionFn(1392); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1393::<>(__sym0); + let __nt = super::__action1392::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 230) } @@ -27178,14 +27178,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Term<"all"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1394); + // Term<"all"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1393); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1394::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1393::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 232) } @@ -27211,14 +27211,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Term<"no-withitems"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1395); + // Term<"no-withitems"> = Term<"all">, MulOp, Factor<"all"> => ActionFn(1394); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant47(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1395::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1394::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 233) } @@ -27244,7 +27244,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Test<"all"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1396); + // Test<"all"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1395); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant15(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -27253,7 +27253,7 @@ mod __parse__Top { let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1396::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1395::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (5, 234) } @@ -27323,7 +27323,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Test<"no-withitems"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1397); + // Test<"no-withitems"> = OrTest<"all">, "if", OrTest<"all">, "else", Test<"all"> => ActionFn(1396); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant15(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -27332,7 +27332,7 @@ mod __parse__Top { let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1397::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1396::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (5, 236) } @@ -27388,11 +27388,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestList? = GenericList => ActionFn(1642); + // TestList? = GenericList => ActionFn(1641); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1642::<>(__sym0); + let __nt = super::__action1641::<>(__sym0); __symbols.push((__start, __Symbol::Variant16(__nt), __end)); (1, 238) } @@ -27417,11 +27417,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestListOrYieldExpr = GenericList => ActionFn(1643); + // TestListOrYieldExpr = GenericList => ActionFn(1642); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1643::<>(__sym0); + let __nt = super::__action1642::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 239) } @@ -27477,11 +27477,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TestOrStarExprList = GenericList => ActionFn(1644); + // TestOrStarExprList = GenericList => ActionFn(1643); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1644::<>(__sym0); + let __nt = super::__action1643::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 241) } @@ -27522,13 +27522,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartModule, Program => ActionFn(1398); + // Top = StartModule, Program => ActionFn(1397); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant25(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1398::<>(__sym0, __sym1); + let __nt = super::__action1397::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (2, 243) } @@ -27539,13 +27539,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartInteractive, Program => ActionFn(1399); + // Top = StartInteractive, Program => ActionFn(1398); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant25(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1399::<>(__sym0, __sym1); + let __nt = super::__action1398::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (2, 243) } @@ -27556,13 +27556,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartExpression, GenericList => ActionFn(1645); + // Top = StartExpression, GenericList => ActionFn(1644); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1645::<>(__sym0, __sym1); + let __nt = super::__action1644::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (2, 243) } @@ -27573,14 +27573,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // Top = StartExpression, GenericList, ("\n")+ => ActionFn(1646); + // Top = StartExpression, GenericList, ("\n")+ => ActionFn(1645); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant22(__symbols); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1646::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1645::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant84(__nt), __end)); (3, 243) } @@ -27591,7 +27591,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1402); + // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1401); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant25(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -27605,7 +27605,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1402::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1401::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (10, 244) } @@ -27616,7 +27616,29 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite => ActionFn(1403); + // TryStatement = "try", ":", Suite, ExceptClause+, "else", ":", Suite => ActionFn(1402); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant25(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant60(__symbols); + let __sym2 = __pop_Variant25(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = super::__action1402::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + __symbols.push((__start, __Symbol::Variant35(__nt), __end)); + (7, 244) + } + pub(crate) fn __reduce826< + >( + __lookahead_start: Option<&TextSize>, + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)>, + _: core::marker::PhantomData<()>, + ) -> (usize, usize) + { + // TryStatement = "try", ":", Suite, ExceptClause+, "finally", ":", Suite => ActionFn(1403); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -27631,28 +27653,6 @@ mod __parse__Top { __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 244) } - pub(crate) fn __reduce826< - >( - __lookahead_start: Option<&TextSize>, - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)>, - _: core::marker::PhantomData<()>, - ) -> (usize, usize) - { - // TryStatement = "try", ":", Suite, ExceptClause+, "finally", ":", Suite => ActionFn(1404); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant25(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant60(__symbols); - let __sym2 = __pop_Variant25(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = super::__action1404::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); - __symbols.push((__start, __Symbol::Variant35(__nt), __end)); - (7, 244) - } pub(crate) fn __reduce827< >( __lookahead_start: Option<&TextSize>, @@ -27660,7 +27660,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptClause+ => ActionFn(1405); + // TryStatement = "try", ":", Suite, ExceptClause+ => ActionFn(1404); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant60(__symbols); let __sym2 = __pop_Variant25(__symbols); @@ -27668,7 +27668,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1405::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1404::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (4, 244) } @@ -27679,7 +27679,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1406); + // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite, "finally", ":", Suite => ActionFn(1405); assert!(__symbols.len() >= 10); let __sym9 = __pop_Variant25(__symbols); let __sym8 = __pop_Variant0(__symbols); @@ -27693,7 +27693,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym9.2; - let __nt = super::__action1406::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); + let __nt = super::__action1405::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (10, 244) } @@ -27704,7 +27704,29 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite => ActionFn(1407); + // TryStatement = "try", ":", Suite, ExceptStarClause+, "else", ":", Suite => ActionFn(1406); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant25(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant60(__symbols); + let __sym2 = __pop_Variant25(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0; + let __end = __sym6.2; + let __nt = super::__action1406::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + __symbols.push((__start, __Symbol::Variant35(__nt), __end)); + (7, 244) + } + pub(crate) fn __reduce830< + >( + __lookahead_start: Option<&TextSize>, + __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)>, + _: core::marker::PhantomData<()>, + ) -> (usize, usize) + { + // TryStatement = "try", ":", Suite, ExceptStarClause+, "finally", ":", Suite => ActionFn(1407); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant25(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -27719,28 +27741,6 @@ mod __parse__Top { __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (7, 244) } - pub(crate) fn __reduce830< - >( - __lookahead_start: Option<&TextSize>, - __symbols: &mut alloc::vec::Vec<(TextSize,__Symbol<>,TextSize)>, - _: core::marker::PhantomData<()>, - ) -> (usize, usize) - { - // TryStatement = "try", ":", Suite, ExceptStarClause+, "finally", ":", Suite => ActionFn(1408); - assert!(__symbols.len() >= 7); - let __sym6 = __pop_Variant25(__symbols); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant60(__symbols); - let __sym2 = __pop_Variant25(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant0(__symbols); - let __start = __sym0.0; - let __end = __sym6.2; - let __nt = super::__action1408::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); - __symbols.push((__start, __Symbol::Variant35(__nt), __end)); - (7, 244) - } pub(crate) fn __reduce831< >( __lookahead_start: Option<&TextSize>, @@ -27748,7 +27748,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TryStatement = "try", ":", Suite, ExceptStarClause+ => ActionFn(1409); + // TryStatement = "try", ":", Suite, ExceptStarClause+ => ActionFn(1408); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant60(__symbols); let __sym2 = __pop_Variant25(__symbols); @@ -27756,7 +27756,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1409::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1408::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant35(__nt), __end)); (4, 244) } @@ -27932,14 +27932,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypedParameter = Identifier, ":", Test<"all"> => ActionFn(1410); + // TypedParameter = Identifier, ":", Test<"all"> => ActionFn(1409); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1410::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1409::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (3, 249) } @@ -27950,11 +27950,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // TypedParameter = Identifier => ActionFn(1411); + // TypedParameter = Identifier => ActionFn(1410); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1411::<>(__sym0); + let __nt = super::__action1410::<>(__sym0); __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (1, 249) } @@ -28039,11 +28039,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // UntypedParameter = Identifier => ActionFn(1412); + // UntypedParameter = Identifier => ActionFn(1411); let __sym0 = __pop_Variant23(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1412::<>(__sym0); + let __nt = super::__action1411::<>(__sym0); __symbols.push((__start, __Symbol::Variant81(__nt), __end)); (1, 252) } @@ -28083,11 +28083,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // ValuePattern = MatchNameOrAttr => ActionFn(1413); + // ValuePattern = MatchNameOrAttr => ActionFn(1412); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1413::<>(__sym0); + let __nt = super::__action1412::<>(__sym0); __symbols.push((__start, __Symbol::Variant33(__nt), __end)); (1, 254) } @@ -28139,11 +28139,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"all"> = Test<"all"> => ActionFn(1414); + // WithItem<"all"> = Test<"all"> => ActionFn(1413); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1414::<>(__sym0); + let __nt = super::__action1413::<>(__sym0); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (1, 256) } @@ -28154,14 +28154,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"all"> = Test<"all">, "as", Expression<"all"> => ActionFn(1415); + // WithItem<"all"> = Test<"all">, "as", Expression<"all"> => ActionFn(1414); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1415::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1414::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (3, 256) } @@ -28172,14 +28172,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"as"> = Test<"all">, "as", Expression<"all"> => ActionFn(1416); + // WithItem<"as"> = Test<"all">, "as", Expression<"all"> => ActionFn(1415); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1416::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1415::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (3, 257) } @@ -28190,11 +28190,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"no-withitems"> = Test<"no-withitems"> => ActionFn(1417); + // WithItem<"no-withitems"> = Test<"no-withitems"> => ActionFn(1416); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1417::<>(__sym0); + let __nt = super::__action1416::<>(__sym0); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (1, 258) } @@ -28205,14 +28205,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItem<"no-withitems"> = Test<"all">, "as", Expression<"all"> => ActionFn(1418); + // WithItem<"no-withitems"> = Test<"all">, "as", Expression<"all"> => ActionFn(1417); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1418::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1417::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant18(__nt), __end)); (3, 258) } @@ -28223,7 +28223,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", ")" => ActionFn(1425); + // WithItems = "(", OneOrMore>, ",", ")" => ActionFn(1424); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -28231,7 +28231,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1425::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1424::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (4, 259) } @@ -28242,14 +28242,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ")" => ActionFn(1426); + // WithItems = "(", OneOrMore>, ")" => ActionFn(1425); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant31(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1426::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1425::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (3, 259) } @@ -28260,7 +28260,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ",", ")" => ActionFn(1428); + // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ",", ")" => ActionFn(1427); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); @@ -28270,7 +28270,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1428::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1427::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (6, 259) } @@ -28281,7 +28281,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItem<"as">, ",", ")" => ActionFn(1429); + // WithItems = "(", WithItem<"as">, ",", ")" => ActionFn(1428); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -28289,7 +28289,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1429::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1428::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (4, 259) } @@ -28300,7 +28300,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ("," >)+, ",", ")" => ActionFn(1430); + // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ("," >)+, ",", ")" => ActionFn(1429); assert!(__symbols.len() >= 7); let __sym6 = __pop_Variant0(__symbols); let __sym5 = __pop_Variant0(__symbols); @@ -28311,7 +28311,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym6.2; - let __nt = super::__action1430::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __nt = super::__action1429::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (7, 259) } @@ -28322,7 +28322,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItem<"as">, ("," >)+, ",", ")" => ActionFn(1431); + // WithItems = "(", WithItem<"as">, ("," >)+, ",", ")" => ActionFn(1430); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -28331,7 +28331,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1431::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1430::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (5, 259) } @@ -28342,7 +28342,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ")" => ActionFn(1432); + // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ")" => ActionFn(1431); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant0(__symbols); let __sym3 = __pop_Variant18(__symbols); @@ -28351,7 +28351,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym4.2; - let __nt = super::__action1432::<>(__sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action1431::<>(__sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (5, 259) } @@ -28362,14 +28362,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItem<"as">, ")" => ActionFn(1433); + // WithItems = "(", WithItem<"as">, ")" => ActionFn(1432); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant18(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1433::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1432::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (3, 259) } @@ -28380,7 +28380,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ("," >)+, ")" => ActionFn(1434); + // WithItems = "(", OneOrMore>, ",", WithItem<"as">, ("," >)+, ")" => ActionFn(1433); assert!(__symbols.len() >= 6); let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant19(__symbols); @@ -28390,7 +28390,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym5.2; - let __nt = super::__action1434::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __nt = super::__action1433::<>(__sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (6, 259) } @@ -28401,7 +28401,7 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItems = "(", WithItem<"as">, ("," >)+, ")" => ActionFn(1435); + // WithItems = "(", WithItem<"as">, ("," >)+, ")" => ActionFn(1434); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant19(__symbols); @@ -28409,7 +28409,7 @@ mod __parse__Top { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym3.2; - let __nt = super::__action1435::<>(__sym0, __sym1, __sym2, __sym3); + let __nt = super::__action1434::<>(__sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (4, 259) } @@ -28452,11 +28452,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // WithItemsNoAs = OneOrMore> => ActionFn(1419); + // WithItemsNoAs = OneOrMore> => ActionFn(1418); let __sym0 = __pop_Variant31(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1419::<>(__sym0); + let __nt = super::__action1418::<>(__sym0); __symbols.push((__start, __Symbol::Variant38(__nt), __end)); (1, 260) } @@ -28506,14 +28506,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // XorExpression<"all"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1420); + // XorExpression<"all"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1419); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1420::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1419::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 262) } @@ -28539,14 +28539,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // XorExpression<"no-withitems"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1421); + // XorExpression<"no-withitems"> = XorExpression<"all">, "^", AndExpression<"all"> => ActionFn(1420); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant15(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1421::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1420::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 263) } @@ -28572,13 +28572,13 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield", GenericList => ActionFn(1649); + // YieldExpr = "yield", GenericList => ActionFn(1648); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant15(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym1.2; - let __nt = super::__action1649::<>(__sym0, __sym1); + let __nt = super::__action1648::<>(__sym0, __sym1); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (2, 264) } @@ -28589,11 +28589,11 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield" => ActionFn(1650); + // YieldExpr = "yield" => ActionFn(1649); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym0.2; - let __nt = super::__action1650::<>(__sym0); + let __nt = super::__action1649::<>(__sym0); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (1, 264) } @@ -28604,14 +28604,14 @@ mod __parse__Top { _: core::marker::PhantomData<()>, ) -> (usize, usize) { - // YieldExpr = "yield", "from", Test<"all"> => ActionFn(1423); + // YieldExpr = "yield", "from", Test<"all"> => ActionFn(1422); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant15(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0; let __end = __sym2.2; - let __nt = super::__action1423::<>(__sym0, __sym1, __sym2); + let __nt = super::__action1422::<>(__sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant15(__nt), __end)); (3, 264) } @@ -28915,11 +28915,11 @@ fn __action24< let mut targets = vec![set_context(expression, ast::ExprContext::Store)]; let mut values = suffix; - while values.len() > 1 { - targets.push(set_context(values.remove(0), ast::ExprContext::Store)); - } + let value = Box::new(values.pop().unwrap()); - let value = Box::new(values.into_iter().next().unwrap()); + for target in values { + targets.push(set_context(target, ast::ExprContext::Store)); + } ast::Stmt::Assign( ast::StmtAssign { targets, value, type_comment: None, range: (location..end_location).into() } @@ -29663,10 +29663,11 @@ fn __action82< (_, guard, _): (TextSize, core::option::Option, TextSize), (_, _, _): (TextSize, token::Tok, TextSize), (_, body, _): (TextSize, ast::Suite, TextSize), - (_, end, _): (TextSize, TextSize, TextSize), ) -> ast::MatchCase { { + // SAFETY: `body` is never empty because it is non-optional and `Suite` matches one or more statements. + let end = body.last().unwrap().end(); ast::MatchCase { pattern, guard: guard.map(Box::new), @@ -42229,7 +42230,6 @@ fn __action815< __2: (TextSize, core::option::Option, TextSize), __3: (TextSize, token::Tok, TextSize), __4: (TextSize, ast::Suite, TextSize), - __5: (TextSize, TextSize, TextSize), ) -> ast::MatchCase { let __start0 = __0.0; @@ -42246,7 +42246,6 @@ fn __action815< __2, __3, __4, - __5, ) } @@ -53434,33 +53433,6 @@ fn __action1277< #[allow(clippy::too_many_arguments)] fn __action1278< ->( - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Pattern, TextSize), - __2: (TextSize, core::option::Option, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, ast::Suite, TextSize), -) -> ast::MatchCase -{ - let __start0 = __4.2; - let __end0 = __4.2; - let __temp0 = __action370( - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action815( - __0, - __1, - __2, - __3, - __4, - __temp0, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1279< >( __0: (TextSize, ast::Identifier, TextSize), ) -> ast::Expr @@ -53479,7 +53451,7 @@ fn __action1279< } #[allow(clippy::too_many_arguments)] -fn __action1280< +fn __action1279< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53502,7 +53474,7 @@ fn __action1280< } #[allow(clippy::too_many_arguments)] -fn __action1281< +fn __action1280< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53525,7 +53497,7 @@ fn __action1281< } #[allow(clippy::too_many_arguments)] -fn __action1282< +fn __action1281< >( __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53548,7 +53520,7 @@ fn __action1282< } #[allow(clippy::too_many_arguments)] -fn __action1283< +fn __action1282< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -53569,7 +53541,7 @@ fn __action1283< } #[allow(clippy::too_many_arguments)] -fn __action1284< +fn __action1283< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -53590,7 +53562,7 @@ fn __action1284< } #[allow(clippy::too_many_arguments)] -fn __action1285< +fn __action1284< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -53611,7 +53583,7 @@ fn __action1285< } #[allow(clippy::too_many_arguments)] -fn __action1286< +fn __action1285< >( __0: (TextSize, Vec, TextSize), ) -> ast::Pattern @@ -53630,7 +53602,7 @@ fn __action1286< } #[allow(clippy::too_many_arguments)] -fn __action1287< +fn __action1286< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -53651,7 +53623,7 @@ fn __action1287< } #[allow(clippy::too_many_arguments)] -fn __action1288< +fn __action1287< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -53672,7 +53644,7 @@ fn __action1288< } #[allow(clippy::too_many_arguments)] -fn __action1289< +fn __action1288< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53703,7 +53675,7 @@ fn __action1289< } #[allow(clippy::too_many_arguments)] -fn __action1290< +fn __action1289< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53732,7 +53704,7 @@ fn __action1290< } #[allow(clippy::too_many_arguments)] -fn __action1291< +fn __action1290< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53765,7 +53737,7 @@ fn __action1291< } #[allow(clippy::too_many_arguments)] -fn __action1292< +fn __action1291< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53796,7 +53768,7 @@ fn __action1292< } #[allow(clippy::too_many_arguments)] -fn __action1293< +fn __action1292< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53823,7 +53795,7 @@ fn __action1293< } #[allow(clippy::too_many_arguments)] -fn __action1294< +fn __action1293< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53848,7 +53820,7 @@ fn __action1294< } #[allow(clippy::too_many_arguments)] -fn __action1295< +fn __action1294< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53877,7 +53849,7 @@ fn __action1295< } #[allow(clippy::too_many_arguments)] -fn __action1296< +fn __action1295< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53904,7 +53876,7 @@ fn __action1296< } #[allow(clippy::too_many_arguments)] -fn __action1297< +fn __action1296< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53925,7 +53897,7 @@ fn __action1297< } #[allow(clippy::too_many_arguments)] -fn __action1298< +fn __action1297< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53954,7 +53926,7 @@ fn __action1298< } #[allow(clippy::too_many_arguments)] -fn __action1299< +fn __action1298< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -53981,7 +53953,7 @@ fn __action1299< } #[allow(clippy::too_many_arguments)] -fn __action1300< +fn __action1299< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54012,7 +53984,7 @@ fn __action1300< } #[allow(clippy::too_many_arguments)] -fn __action1301< +fn __action1300< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54041,7 +54013,7 @@ fn __action1301< } #[allow(clippy::too_many_arguments)] -fn __action1302< +fn __action1301< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54066,7 +54038,7 @@ fn __action1302< } #[allow(clippy::too_many_arguments)] -fn __action1303< +fn __action1302< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54089,7 +54061,7 @@ fn __action1303< } #[allow(clippy::too_many_arguments)] -fn __action1304< +fn __action1303< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54116,7 +54088,7 @@ fn __action1304< } #[allow(clippy::too_many_arguments)] -fn __action1305< +fn __action1304< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54141,7 +54113,7 @@ fn __action1305< } #[allow(clippy::too_many_arguments)] -fn __action1306< +fn __action1305< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), ) -> Result> @@ -54160,7 +54132,7 @@ fn __action1306< } #[allow(clippy::too_many_arguments)] -fn __action1307< +fn __action1306< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54185,7 +54157,7 @@ fn __action1307< } #[allow(clippy::too_many_arguments)] -fn __action1308< +fn __action1307< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54208,7 +54180,7 @@ fn __action1308< } #[allow(clippy::too_many_arguments)] -fn __action1309< +fn __action1308< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54235,7 +54207,7 @@ fn __action1309< } #[allow(clippy::too_many_arguments)] -fn __action1310< +fn __action1309< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54260,7 +54232,7 @@ fn __action1310< } #[allow(clippy::too_many_arguments)] -fn __action1311< +fn __action1310< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54289,7 +54261,7 @@ fn __action1311< } #[allow(clippy::too_many_arguments)] -fn __action1312< +fn __action1311< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -54316,7 +54288,7 @@ fn __action1312< } #[allow(clippy::too_many_arguments)] -fn __action1313< +fn __action1312< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54339,7 +54311,7 @@ fn __action1313< } #[allow(clippy::too_many_arguments)] -fn __action1314< +fn __action1313< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54360,7 +54332,7 @@ fn __action1314< } #[allow(clippy::too_many_arguments)] -fn __action1315< +fn __action1314< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54385,7 +54357,7 @@ fn __action1315< } #[allow(clippy::too_many_arguments)] -fn __action1316< +fn __action1315< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -54408,7 +54380,7 @@ fn __action1316< } #[allow(clippy::too_many_arguments)] -fn __action1317< +fn __action1316< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54433,7 +54405,7 @@ fn __action1317< } #[allow(clippy::too_many_arguments)] -fn __action1318< +fn __action1317< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54456,7 +54428,7 @@ fn __action1318< } #[allow(clippy::too_many_arguments)] -fn __action1319< +fn __action1318< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54483,7 +54455,7 @@ fn __action1319< } #[allow(clippy::too_many_arguments)] -fn __action1320< +fn __action1319< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -54508,7 +54480,7 @@ fn __action1320< } #[allow(clippy::too_many_arguments)] -fn __action1321< +fn __action1320< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54529,7 +54501,7 @@ fn __action1321< } #[allow(clippy::too_many_arguments)] -fn __action1322< +fn __action1321< >( __0: (TextSize, token::Tok, TextSize), ) -> Result> @@ -54548,7 +54520,7 @@ fn __action1322< } #[allow(clippy::too_many_arguments)] -fn __action1323< +fn __action1322< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -54571,7 +54543,7 @@ fn __action1323< } #[allow(clippy::too_many_arguments)] -fn __action1324< +fn __action1323< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -54592,7 +54564,7 @@ fn __action1324< } #[allow(clippy::too_many_arguments)] -fn __action1325< +fn __action1324< >( __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54613,7 +54585,7 @@ fn __action1325< } #[allow(clippy::too_many_arguments)] -fn __action1326< +fn __action1325< >( __0: (TextSize, Option>, TextSize), ) -> ast::Arguments @@ -54632,7 +54604,7 @@ fn __action1326< } #[allow(clippy::too_many_arguments)] -fn __action1327< +fn __action1326< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54663,7 +54635,7 @@ fn __action1327< } #[allow(clippy::too_many_arguments)] -fn __action1328< +fn __action1327< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54692,7 +54664,7 @@ fn __action1328< } #[allow(clippy::too_many_arguments)] -fn __action1329< +fn __action1328< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54725,7 +54697,7 @@ fn __action1329< } #[allow(clippy::too_many_arguments)] -fn __action1330< +fn __action1329< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54756,7 +54728,7 @@ fn __action1330< } #[allow(clippy::too_many_arguments)] -fn __action1331< +fn __action1330< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54783,7 +54755,7 @@ fn __action1331< } #[allow(clippy::too_many_arguments)] -fn __action1332< +fn __action1331< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54808,7 +54780,7 @@ fn __action1332< } #[allow(clippy::too_many_arguments)] -fn __action1333< +fn __action1332< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54837,7 +54809,7 @@ fn __action1333< } #[allow(clippy::too_many_arguments)] -fn __action1334< +fn __action1333< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54864,7 +54836,7 @@ fn __action1334< } #[allow(clippy::too_many_arguments)] -fn __action1335< +fn __action1334< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54885,7 +54857,7 @@ fn __action1335< } #[allow(clippy::too_many_arguments)] -fn __action1336< +fn __action1335< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54914,7 +54886,7 @@ fn __action1336< } #[allow(clippy::too_many_arguments)] -fn __action1337< +fn __action1336< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54941,7 +54913,7 @@ fn __action1337< } #[allow(clippy::too_many_arguments)] -fn __action1338< +fn __action1337< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -54972,7 +54944,7 @@ fn __action1338< } #[allow(clippy::too_many_arguments)] -fn __action1339< +fn __action1338< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55001,7 +54973,7 @@ fn __action1339< } #[allow(clippy::too_many_arguments)] -fn __action1340< +fn __action1339< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55026,7 +54998,7 @@ fn __action1340< } #[allow(clippy::too_many_arguments)] -fn __action1341< +fn __action1340< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55049,7 +55021,7 @@ fn __action1341< } #[allow(clippy::too_many_arguments)] -fn __action1342< +fn __action1341< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55076,7 +55048,7 @@ fn __action1342< } #[allow(clippy::too_many_arguments)] -fn __action1343< +fn __action1342< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55101,7 +55073,7 @@ fn __action1343< } #[allow(clippy::too_many_arguments)] -fn __action1344< +fn __action1343< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), ) -> Result> @@ -55120,7 +55092,7 @@ fn __action1344< } #[allow(clippy::too_many_arguments)] -fn __action1345< +fn __action1344< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55145,7 +55117,7 @@ fn __action1345< } #[allow(clippy::too_many_arguments)] -fn __action1346< +fn __action1345< >( __0: (TextSize, (Vec<(ast::Arg, Option)>, Vec<(ast::Arg, Option)>), TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55168,7 +55140,7 @@ fn __action1346< } #[allow(clippy::too_many_arguments)] -fn __action1347< +fn __action1346< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55195,7 +55167,7 @@ fn __action1347< } #[allow(clippy::too_many_arguments)] -fn __action1348< +fn __action1347< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55220,7 +55192,7 @@ fn __action1348< } #[allow(clippy::too_many_arguments)] -fn __action1349< +fn __action1348< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55249,7 +55221,7 @@ fn __action1349< } #[allow(clippy::too_many_arguments)] -fn __action1350< +fn __action1349< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -55276,7 +55248,7 @@ fn __action1350< } #[allow(clippy::too_many_arguments)] -fn __action1351< +fn __action1350< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55299,7 +55271,7 @@ fn __action1351< } #[allow(clippy::too_many_arguments)] -fn __action1352< +fn __action1351< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55320,7 +55292,7 @@ fn __action1352< } #[allow(clippy::too_many_arguments)] -fn __action1353< +fn __action1352< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55345,7 +55317,7 @@ fn __action1353< } #[allow(clippy::too_many_arguments)] -fn __action1354< +fn __action1353< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -55368,7 +55340,7 @@ fn __action1354< } #[allow(clippy::too_many_arguments)] -fn __action1355< +fn __action1354< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55393,7 +55365,7 @@ fn __action1355< } #[allow(clippy::too_many_arguments)] -fn __action1356< +fn __action1355< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55416,7 +55388,7 @@ fn __action1356< } #[allow(clippy::too_many_arguments)] -fn __action1357< +fn __action1356< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55443,7 +55415,7 @@ fn __action1357< } #[allow(clippy::too_many_arguments)] -fn __action1358< +fn __action1357< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -55468,7 +55440,7 @@ fn __action1358< } #[allow(clippy::too_many_arguments)] -fn __action1359< +fn __action1358< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55489,7 +55461,7 @@ fn __action1359< } #[allow(clippy::too_many_arguments)] -fn __action1360< +fn __action1359< >( __0: (TextSize, token::Tok, TextSize), ) -> Result> @@ -55508,7 +55480,7 @@ fn __action1360< } #[allow(clippy::too_many_arguments)] -fn __action1361< +fn __action1360< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -55531,7 +55503,7 @@ fn __action1361< } #[allow(clippy::too_many_arguments)] -fn __action1362< +fn __action1361< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), @@ -55552,7 +55524,7 @@ fn __action1362< } #[allow(clippy::too_many_arguments)] -fn __action1363< +fn __action1362< >( __0: (TextSize, Option>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55573,7 +55545,7 @@ fn __action1363< } #[allow(clippy::too_many_arguments)] -fn __action1364< +fn __action1363< >( __0: (TextSize, Option>, TextSize), ) -> ast::Arguments @@ -55592,7 +55564,7 @@ fn __action1364< } #[allow(clippy::too_many_arguments)] -fn __action1365< +fn __action1364< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, core::option::Option, TextSize), @@ -55615,7 +55587,7 @@ fn __action1365< } #[allow(clippy::too_many_arguments)] -fn __action1366< +fn __action1365< >( __0: (TextSize, token::Tok, TextSize), ) -> ast::Stmt @@ -55634,7 +55606,7 @@ fn __action1366< } #[allow(clippy::too_many_arguments)] -fn __action1367< +fn __action1366< >( __0: (TextSize, ast::Pattern, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55655,7 +55627,7 @@ fn __action1367< } #[allow(clippy::too_many_arguments)] -fn __action1368< +fn __action1367< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55676,7 +55648,7 @@ fn __action1368< } #[allow(clippy::too_many_arguments)] -fn __action1369< +fn __action1368< >( __0: (TextSize, Vec, TextSize), ) -> ast::Pattern @@ -55695,7 +55667,7 @@ fn __action1369< } #[allow(clippy::too_many_arguments)] -fn __action1370< +fn __action1369< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55718,7 +55690,7 @@ fn __action1370< } #[allow(clippy::too_many_arguments)] -fn __action1371< +fn __action1370< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55741,7 +55713,7 @@ fn __action1371< } #[allow(clippy::too_many_arguments)] -fn __action1372< +fn __action1371< >( __0: (TextSize, token::Tok, TextSize), ) -> ast::Stmt @@ -55760,7 +55732,7 @@ fn __action1372< } #[allow(clippy::too_many_arguments)] -fn __action1373< +fn __action1372< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -55785,7 +55757,7 @@ fn __action1373< } #[allow(clippy::too_many_arguments)] -fn __action1374< +fn __action1373< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -55806,7 +55778,7 @@ fn __action1374< } #[allow(clippy::too_many_arguments)] -fn __action1375< +fn __action1374< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -55829,7 +55801,7 @@ fn __action1375< } #[allow(clippy::too_many_arguments)] -fn __action1376< +fn __action1375< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -55850,7 +55822,7 @@ fn __action1376< } #[allow(clippy::too_many_arguments)] -fn __action1377< +fn __action1376< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -55875,7 +55847,7 @@ fn __action1377< } #[allow(clippy::too_many_arguments)] -fn __action1378< +fn __action1377< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -55902,7 +55874,7 @@ fn __action1378< } #[allow(clippy::too_many_arguments)] -fn __action1379< +fn __action1378< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -55927,7 +55899,7 @@ fn __action1379< } #[allow(clippy::too_many_arguments)] -fn __action1380< +fn __action1379< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -55950,7 +55922,7 @@ fn __action1380< } #[allow(clippy::too_many_arguments)] -fn __action1381< +fn __action1380< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::Operator, TextSize), @@ -55973,7 +55945,7 @@ fn __action1381< } #[allow(clippy::too_many_arguments)] -fn __action1382< +fn __action1381< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::Operator, TextSize), @@ -55996,7 +55968,7 @@ fn __action1382< } #[allow(clippy::too_many_arguments)] -fn __action1383< +fn __action1382< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56025,7 +55997,7 @@ fn __action1383< } #[allow(clippy::too_many_arguments)] -fn __action1384< +fn __action1383< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -56052,7 +56024,7 @@ fn __action1384< } #[allow(clippy::too_many_arguments)] -fn __action1385< +fn __action1384< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -56073,7 +56045,7 @@ fn __action1385< } #[allow(clippy::too_many_arguments)] -fn __action1386< +fn __action1385< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -56094,7 +56066,7 @@ fn __action1386< } #[allow(clippy::too_many_arguments)] -fn __action1387< +fn __action1386< >( __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56117,7 +56089,7 @@ fn __action1387< } #[allow(clippy::too_many_arguments)] -fn __action1388< +fn __action1387< >( __0: (TextSize, ast::Identifier, TextSize), ) -> ast::Arg @@ -56136,7 +56108,7 @@ fn __action1388< } #[allow(clippy::too_many_arguments)] -fn __action1389< +fn __action1388< >( __0: (TextSize, core::option::Option, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56161,7 +56133,7 @@ fn __action1389< } #[allow(clippy::too_many_arguments)] -fn __action1390< +fn __action1389< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Expr @@ -56180,7 +56152,7 @@ fn __action1390< } #[allow(clippy::too_many_arguments)] -fn __action1391< +fn __action1390< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56201,7 +56173,7 @@ fn __action1391< } #[allow(clippy::too_many_arguments)] -fn __action1392< +fn __action1391< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56222,7 +56194,7 @@ fn __action1392< } #[allow(clippy::too_many_arguments)] -fn __action1393< +fn __action1392< >( __0: (TextSize, Vec, TextSize), ) -> ast::Expr @@ -56241,7 +56213,7 @@ fn __action1393< } #[allow(clippy::too_many_arguments)] -fn __action1394< +fn __action1393< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::Operator, TextSize), @@ -56264,7 +56236,7 @@ fn __action1394< } #[allow(clippy::too_many_arguments)] -fn __action1395< +fn __action1394< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::Operator, TextSize), @@ -56287,7 +56259,7 @@ fn __action1395< } #[allow(clippy::too_many_arguments)] -fn __action1396< +fn __action1395< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56314,7 +56286,7 @@ fn __action1396< } #[allow(clippy::too_many_arguments)] -fn __action1397< +fn __action1396< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56341,7 +56313,7 @@ fn __action1397< } #[allow(clippy::too_many_arguments)] -fn __action1398< +fn __action1397< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Suite, TextSize), @@ -56362,7 +56334,7 @@ fn __action1398< } #[allow(clippy::too_many_arguments)] -fn __action1399< +fn __action1398< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Suite, TextSize), @@ -56383,7 +56355,7 @@ fn __action1399< } #[allow(clippy::too_many_arguments)] -fn __action1400< +fn __action1399< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -56404,7 +56376,7 @@ fn __action1400< } #[allow(clippy::too_many_arguments)] -fn __action1401< +fn __action1400< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -56427,7 +56399,7 @@ fn __action1401< } #[allow(clippy::too_many_arguments)] -fn __action1402< +fn __action1401< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56464,7 +56436,7 @@ fn __action1402< } #[allow(clippy::too_many_arguments)] -fn __action1403< +fn __action1402< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56495,7 +56467,7 @@ fn __action1403< } #[allow(clippy::too_many_arguments)] -fn __action1404< +fn __action1403< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56526,7 +56498,7 @@ fn __action1404< } #[allow(clippy::too_many_arguments)] -fn __action1405< +fn __action1404< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56551,7 +56523,7 @@ fn __action1405< } #[allow(clippy::too_many_arguments)] -fn __action1406< +fn __action1405< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56588,7 +56560,7 @@ fn __action1406< } #[allow(clippy::too_many_arguments)] -fn __action1407< +fn __action1406< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56619,7 +56591,7 @@ fn __action1407< } #[allow(clippy::too_many_arguments)] -fn __action1408< +fn __action1407< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56650,7 +56622,7 @@ fn __action1408< } #[allow(clippy::too_many_arguments)] -fn __action1409< +fn __action1408< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56675,7 +56647,7 @@ fn __action1409< } #[allow(clippy::too_many_arguments)] -fn __action1410< +fn __action1409< >( __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56698,7 +56670,7 @@ fn __action1410< } #[allow(clippy::too_many_arguments)] -fn __action1411< +fn __action1410< >( __0: (TextSize, ast::Identifier, TextSize), ) -> ast::Arg @@ -56717,7 +56689,7 @@ fn __action1411< } #[allow(clippy::too_many_arguments)] -fn __action1412< +fn __action1411< >( __0: (TextSize, ast::Identifier, TextSize), ) -> ast::Arg @@ -56736,7 +56708,7 @@ fn __action1412< } #[allow(clippy::too_many_arguments)] -fn __action1413< +fn __action1412< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Pattern @@ -56755,7 +56727,7 @@ fn __action1413< } #[allow(clippy::too_many_arguments)] -fn __action1414< +fn __action1413< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Withitem @@ -56774,7 +56746,7 @@ fn __action1414< } #[allow(clippy::too_many_arguments)] -fn __action1415< +fn __action1414< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56797,7 +56769,7 @@ fn __action1415< } #[allow(clippy::too_many_arguments)] -fn __action1416< +fn __action1415< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56820,7 +56792,7 @@ fn __action1416< } #[allow(clippy::too_many_arguments)] -fn __action1417< +fn __action1416< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Withitem @@ -56839,7 +56811,7 @@ fn __action1417< } #[allow(clippy::too_many_arguments)] -fn __action1418< +fn __action1417< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56862,7 +56834,7 @@ fn __action1418< } #[allow(clippy::too_many_arguments)] -fn __action1419< +fn __action1418< >( __0: (TextSize, Vec, TextSize), ) -> Vec @@ -56881,7 +56853,7 @@ fn __action1419< } #[allow(clippy::too_many_arguments)] -fn __action1420< +fn __action1419< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56904,7 +56876,7 @@ fn __action1420< } #[allow(clippy::too_many_arguments)] -fn __action1421< +fn __action1420< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56927,7 +56899,7 @@ fn __action1421< } #[allow(clippy::too_many_arguments)] -fn __action1422< +fn __action1421< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, core::option::Option, TextSize), @@ -56948,7 +56920,7 @@ fn __action1422< } #[allow(clippy::too_many_arguments)] -fn __action1423< +fn __action1422< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56971,7 +56943,7 @@ fn __action1423< } #[allow(clippy::too_many_arguments)] -fn __action1424< +fn __action1423< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -56979,7 +56951,7 @@ fn __action1424< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1419( + let __temp0 = __action1418( __0, ); let __temp0 = (__start0, __temp0, __end0); @@ -56990,7 +56962,7 @@ fn __action1424< } #[allow(clippy::too_many_arguments)] -fn __action1425< +fn __action1424< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57000,7 +56972,7 @@ fn __action1425< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1419( + let __temp0 = __action1418( __1, ); let __temp0 = (__start0, __temp0, __end0); @@ -57013,7 +56985,7 @@ fn __action1425< } #[allow(clippy::too_many_arguments)] -fn __action1426< +fn __action1425< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57022,7 +56994,7 @@ fn __action1426< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1419( + let __temp0 = __action1418( __1, ); let __temp0 = (__start0, __temp0, __end0); @@ -57034,7 +57006,7 @@ fn __action1426< } #[allow(clippy::too_many_arguments)] -fn __action1427< +fn __action1426< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57042,7 +57014,7 @@ fn __action1427< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action1424( + let __temp0 = __action1423( __0, __1, ); @@ -57053,7 +57025,7 @@ fn __action1427< } #[allow(clippy::too_many_arguments)] -fn __action1428< +fn __action1427< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57065,7 +57037,7 @@ fn __action1428< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1427( + let __temp0 = __action1426( __1, __2, ); @@ -57080,7 +57052,7 @@ fn __action1428< } #[allow(clippy::too_many_arguments)] -fn __action1429< +fn __action1428< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Withitem, TextSize), @@ -57105,7 +57077,7 @@ fn __action1429< } #[allow(clippy::too_many_arguments)] -fn __action1430< +fn __action1429< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57118,7 +57090,7 @@ fn __action1430< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1427( + let __temp0 = __action1426( __1, __2, ); @@ -57134,7 +57106,7 @@ fn __action1430< } #[allow(clippy::too_many_arguments)] -fn __action1431< +fn __action1430< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Withitem, TextSize), @@ -57161,7 +57133,7 @@ fn __action1431< } #[allow(clippy::too_many_arguments)] -fn __action1432< +fn __action1431< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57172,7 +57144,7 @@ fn __action1432< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1427( + let __temp0 = __action1426( __1, __2, ); @@ -57186,7 +57158,7 @@ fn __action1432< } #[allow(clippy::too_many_arguments)] -fn __action1433< +fn __action1432< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Withitem, TextSize), @@ -57209,7 +57181,7 @@ fn __action1433< } #[allow(clippy::too_many_arguments)] -fn __action1434< +fn __action1433< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -57221,7 +57193,7 @@ fn __action1434< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1427( + let __temp0 = __action1426( __1, __2, ); @@ -57236,7 +57208,7 @@ fn __action1434< } #[allow(clippy::too_many_arguments)] -fn __action1435< +fn __action1434< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Withitem, TextSize), @@ -57261,7 +57233,7 @@ fn __action1435< } #[allow(clippy::too_many_arguments)] -fn __action1436< +fn __action1435< >( __0: (TextSize, (String, StringKind, bool), TextSize), ) -> alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)> @@ -57278,7 +57250,7 @@ fn __action1436< } #[allow(clippy::too_many_arguments)] -fn __action1437< +fn __action1436< >( __0: (TextSize, alloc::vec::Vec<(TextSize, (String, StringKind, bool), TextSize)>, TextSize), __1: (TextSize, (String, StringKind, bool), TextSize), @@ -57297,7 +57269,7 @@ fn __action1437< } #[allow(clippy::too_many_arguments)] -fn __action1438< +fn __action1437< >( __0: (TextSize, ast::Cmpop, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -57316,7 +57288,7 @@ fn __action1438< } #[allow(clippy::too_many_arguments)] -fn __action1439< +fn __action1438< >( __0: (TextSize, alloc::vec::Vec<(ast::Cmpop, ast::Expr)>, TextSize), __1: (TextSize, ast::Cmpop, TextSize), @@ -57337,7 +57309,7 @@ fn __action1439< } #[allow(clippy::too_many_arguments)] -fn __action1440< +fn __action1439< >( __0: (TextSize, ast::Expr, TextSize), ) -> core::option::Option @@ -57354,7 +57326,7 @@ fn __action1440< } #[allow(clippy::too_many_arguments)] -fn __action1441< +fn __action1440< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -57365,11 +57337,11 @@ fn __action1441< { let __start0 = __2.0; let __end0 = __2.2; - let __temp0 = __action1440( + let __temp0 = __action1439( __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1278( + __action815( __0, __1, __temp0, @@ -57379,7 +57351,7 @@ fn __action1441< } #[allow(clippy::too_many_arguments)] -fn __action1442< +fn __action1441< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -57394,7 +57366,7 @@ fn __action1442< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1278( + __action815( __0, __1, __temp0, @@ -57404,7 +57376,7 @@ fn __action1442< } #[allow(clippy::too_many_arguments)] -fn __action1443< +fn __action1442< >( __0: (TextSize, ast::Arguments, TextSize), ) -> core::option::Option @@ -57421,7 +57393,7 @@ fn __action1443< } #[allow(clippy::too_many_arguments)] -fn __action1444< +fn __action1443< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arguments, TextSize), @@ -57430,11 +57402,11 @@ fn __action1444< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1443( + let __temp0 = __action1442( __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1365( + __action1364( __0, __temp0, __2, @@ -57442,7 +57414,7 @@ fn __action1444< } #[allow(clippy::too_many_arguments)] -fn __action1445< +fn __action1444< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57455,7 +57427,7 @@ fn __action1445< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1365( + __action1364( __0, __temp0, __1, @@ -57463,7 +57435,7 @@ fn __action1445< } #[allow(clippy::too_many_arguments)] -fn __action1446< +fn __action1445< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Stmt @@ -57482,7 +57454,7 @@ fn __action1446< } #[allow(clippy::too_many_arguments)] -fn __action1447< +fn __action1446< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -57501,7 +57473,7 @@ fn __action1447< } #[allow(clippy::too_many_arguments)] -fn __action1448< +fn __action1447< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57524,7 +57496,7 @@ fn __action1448< } #[allow(clippy::too_many_arguments)] -fn __action1449< +fn __action1448< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57547,7 +57519,7 @@ fn __action1449< } #[allow(clippy::too_many_arguments)] -fn __action1450< +fn __action1449< >( __0: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), ) -> Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)> @@ -57564,7 +57536,7 @@ fn __action1450< } #[allow(clippy::too_many_arguments)] -fn __action1451< +fn __action1450< >( __lookbehind: &TextSize, __lookahead: &TextSize, @@ -57583,7 +57555,7 @@ fn __action1451< } #[allow(clippy::too_many_arguments)] -fn __action1452< +fn __action1451< >( __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), __1: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), @@ -57602,7 +57574,7 @@ fn __action1452< } #[allow(clippy::too_many_arguments)] -fn __action1453< +fn __action1452< >( __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), ) -> Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)> @@ -57621,14 +57593,14 @@ fn __action1453< } #[allow(clippy::too_many_arguments)] -fn __action1454< +fn __action1453< >( __0: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), ) -> Result> { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1450( + let __temp0 = __action1449( __0, ); let __temp0 = (__start0, __temp0, __end0); @@ -57637,18 +57609,37 @@ fn __action1454< ) } +#[allow(clippy::too_many_arguments)] +fn __action1454< +>( + __lookbehind: &TextSize, + __lookahead: &TextSize, +) -> Result> +{ + let __start0 = *__lookbehind; + let __end0 = *__lookahead; + let __temp0 = __action1450( + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action214( + __temp0, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1455< >( - __lookbehind: &TextSize, - __lookahead: &TextSize, + __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), + __1: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), ) -> Result> { - let __start0 = *__lookbehind; - let __end0 = *__lookahead; + let __start0 = __0.0; + let __end0 = __1.2; let __temp0 = __action1451( - &__start0, - &__end0, + __0, + __1, ); let __temp0 = (__start0, __temp0, __end0); __action214( @@ -57660,14 +57651,12 @@ fn __action1455< fn __action1456< >( __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), - __1: (TextSize, (Option<(TextSize, TextSize, Option)>, ast::Expr), TextSize), ) -> Result> { let __start0 = __0.0; - let __end0 = __1.2; + let __end0 = __0.2; let __temp0 = __action1452( __0, - __1, ); let __temp0 = (__start0, __temp0, __end0); __action214( @@ -57677,23 +57666,6 @@ fn __action1456< #[allow(clippy::too_many_arguments)] fn __action1457< ->( - __0: (TextSize, alloc::vec::Vec<(Option<(TextSize, TextSize, Option)>, ast::Expr)>, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1453( - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action214( - __temp0, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1458< >( __0: (TextSize, ast::Pattern, TextSize), ) -> Vec @@ -57710,7 +57682,7 @@ fn __action1458< } #[allow(clippy::too_many_arguments)] -fn __action1459< +fn __action1458< >( __lookbehind: &TextSize, __lookahead: &TextSize, @@ -57729,7 +57701,7 @@ fn __action1459< } #[allow(clippy::too_many_arguments)] -fn __action1460< +fn __action1459< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -57748,7 +57720,7 @@ fn __action1460< } #[allow(clippy::too_many_arguments)] -fn __action1461< +fn __action1460< >( __0: (TextSize, alloc::vec::Vec, TextSize), ) -> Vec @@ -57767,7 +57739,7 @@ fn __action1461< } #[allow(clippy::too_many_arguments)] -fn __action1462< +fn __action1461< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Pattern, TextSize), @@ -57776,11 +57748,11 @@ fn __action1462< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1458( + let __temp0 = __action1457( __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1380( + __action1379( __0, __temp0, __2, @@ -57788,7 +57760,7 @@ fn __action1462< } #[allow(clippy::too_many_arguments)] -fn __action1463< +fn __action1462< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57796,12 +57768,12 @@ fn __action1463< { let __start0 = __0.2; let __end0 = __1.0; - let __temp0 = __action1459( + let __temp0 = __action1458( &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1380( + __action1379( __0, __temp0, __1, @@ -57809,7 +57781,7 @@ fn __action1463< } #[allow(clippy::too_many_arguments)] -fn __action1464< +fn __action1463< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -57819,12 +57791,12 @@ fn __action1464< { let __start0 = __1.0; let __end0 = __2.2; - let __temp0 = __action1460( + let __temp0 = __action1459( __1, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1380( + __action1379( __0, __temp0, __3, @@ -57832,7 +57804,7 @@ fn __action1464< } #[allow(clippy::too_many_arguments)] -fn __action1465< +fn __action1464< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -57841,11 +57813,11 @@ fn __action1465< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1461( + let __temp0 = __action1460( __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1380( + __action1379( __0, __temp0, __2, @@ -57853,7 +57825,7 @@ fn __action1465< } #[allow(clippy::too_many_arguments)] -fn __action1466< +fn __action1465< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, Vec, TextSize), @@ -57872,7 +57844,7 @@ fn __action1466< } #[allow(clippy::too_many_arguments)] -fn __action1467< +fn __action1466< >( __0: (TextSize, ast::Expr, TextSize), ) -> (Option<(TextSize, TextSize, Option)>, ast::Expr) @@ -57891,7 +57863,7 @@ fn __action1467< } #[allow(clippy::too_many_arguments)] -fn __action1468< +fn __action1467< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57907,7 +57879,7 @@ fn __action1468< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1383( + __action1382( __0, __1, __2, @@ -57918,7 +57890,7 @@ fn __action1468< } #[allow(clippy::too_many_arguments)] -fn __action1469< +fn __action1468< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -57934,7 +57906,7 @@ fn __action1469< __5, ); let __temp0 = (__start0, __temp0, __end0); - __action1383( + __action1382( __0, __1, __2, @@ -57945,7 +57917,7 @@ fn __action1469< } #[allow(clippy::too_many_arguments)] -fn __action1470< +fn __action1469< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -57960,7 +57932,7 @@ fn __action1470< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1384( + __action1383( __0, __1, __2, @@ -57970,7 +57942,7 @@ fn __action1470< } #[allow(clippy::too_many_arguments)] -fn __action1471< +fn __action1470< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -57985,7 +57957,7 @@ fn __action1471< __4, ); let __temp0 = (__start0, __temp0, __end0); - __action1384( + __action1383( __0, __1, __2, @@ -57995,7 +57967,7 @@ fn __action1471< } #[allow(clippy::too_many_arguments)] -fn __action1472< +fn __action1471< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -58026,7 +57998,7 @@ fn __action1472< } #[allow(clippy::too_many_arguments)] -fn __action1473< +fn __action1472< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58057,7 +58029,7 @@ fn __action1473< } #[allow(clippy::too_many_arguments)] -fn __action1474< +fn __action1473< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -58082,7 +58054,7 @@ fn __action1474< } #[allow(clippy::too_many_arguments)] -fn __action1475< +fn __action1474< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58107,7 +58079,7 @@ fn __action1475< } #[allow(clippy::too_many_arguments)] -fn __action1476< +fn __action1475< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58140,7 +58112,7 @@ fn __action1476< } #[allow(clippy::too_many_arguments)] -fn __action1477< +fn __action1476< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58173,7 +58145,7 @@ fn __action1477< } #[allow(clippy::too_many_arguments)] -fn __action1478< +fn __action1477< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58202,7 +58174,7 @@ fn __action1478< } #[allow(clippy::too_many_arguments)] -fn __action1479< +fn __action1478< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58231,7 +58203,7 @@ fn __action1479< } #[allow(clippy::too_many_arguments)] -fn __action1480< +fn __action1479< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -58262,7 +58234,7 @@ fn __action1480< } #[allow(clippy::too_many_arguments)] -fn __action1481< +fn __action1480< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58293,7 +58265,7 @@ fn __action1481< } #[allow(clippy::too_many_arguments)] -fn __action1482< +fn __action1481< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -58320,7 +58292,7 @@ fn __action1482< } #[allow(clippy::too_many_arguments)] -fn __action1483< +fn __action1482< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58347,7 +58319,7 @@ fn __action1483< } #[allow(clippy::too_many_arguments)] -fn __action1484< +fn __action1483< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), @@ -58367,29 +58339,29 @@ fn __action1484< ) } +#[allow(clippy::too_many_arguments)] +fn __action1484< +>( + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::Expr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action522( + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1172( + __0, + __temp0, + __1, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1485< ->( - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action522( - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1172( - __0, - __temp0, - __1, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1486< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec<(Option>, ast::Expr)>, TextSize), @@ -58410,7 +58382,7 @@ fn __action1486< } #[allow(clippy::too_many_arguments)] -fn __action1487< +fn __action1486< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58431,7 +58403,7 @@ fn __action1487< } #[allow(clippy::too_many_arguments)] -fn __action1488< +fn __action1487< >( __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58452,7 +58424,7 @@ fn __action1488< } #[allow(clippy::too_many_arguments)] -fn __action1489< +fn __action1488< >( __0: (TextSize, ast::Identifier, TextSize), ) -> Vec @@ -58469,7 +58441,7 @@ fn __action1489< } #[allow(clippy::too_many_arguments)] -fn __action1490< +fn __action1489< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58493,29 +58465,29 @@ fn __action1490< ) } +#[allow(clippy::too_many_arguments)] +fn __action1490< +>( + __0: (TextSize, Vec, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, ast::Identifier, TextSize), +) -> Vec +{ + let __start0 = __2.0; + let __end0 = __2.2; + let __temp0 = __action1252( + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action348( + __0, + __1, + __temp0, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1491< ->( - __0: (TextSize, Vec, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, ast::Identifier, TextSize), -) -> Vec -{ - let __start0 = __2.0; - let __end0 = __2.2; - let __temp0 = __action1252( - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action348( - __0, - __1, - __temp0, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1492< >( __0: (TextSize, ast::Identifier, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58536,7 +58508,7 @@ fn __action1492< } #[allow(clippy::too_many_arguments)] -fn __action1493< +fn __action1492< >( __0: (TextSize, ast::Identifier, TextSize), ) -> Vec @@ -58553,7 +58525,7 @@ fn __action1493< } #[allow(clippy::too_many_arguments)] -fn __action1494< +fn __action1493< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58578,7 +58550,7 @@ fn __action1494< } #[allow(clippy::too_many_arguments)] -fn __action1495< +fn __action1494< >( __0: (TextSize, Vec, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58599,7 +58571,7 @@ fn __action1495< } #[allow(clippy::too_many_arguments)] -fn __action1496< +fn __action1495< >( __0: (TextSize, ast::Identifier, TextSize), ) -> (Option, Option) @@ -58618,7 +58590,7 @@ fn __action1496< } #[allow(clippy::too_many_arguments)] -fn __action1497< +fn __action1496< >( __0: (TextSize, alloc::vec::Vec, TextSize), __1: (TextSize, ast::Identifier, TextSize), @@ -58637,7 +58609,7 @@ fn __action1497< } #[allow(clippy::too_many_arguments)] -fn __action1498< +fn __action1497< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -58657,29 +58629,29 @@ fn __action1498< ) } +#[allow(clippy::too_many_arguments)] +fn __action1498< +>( + __0: (TextSize, token::Tok, TextSize), + __1: (TextSize, token::Tok, TextSize), +) -> ast::Expr +{ + let __start0 = __0.2; + let __end0 = __1.0; + let __temp0 = __action530( + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1157( + __0, + __temp0, + __1, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1499< ->( - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, token::Tok, TextSize), -) -> ast::Expr -{ - let __start0 = __0.2; - let __end0 = __1.0; - let __temp0 = __action530( - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1157( - __0, - __temp0, - __1, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1500< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Vec, TextSize), @@ -58700,7 +58672,7 @@ fn __action1500< } #[allow(clippy::too_many_arguments)] -fn __action1501< +fn __action1500< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58721,7 +58693,7 @@ fn __action1501< } #[allow(clippy::too_many_arguments)] -fn __action1502< +fn __action1501< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58738,7 +58710,7 @@ fn __action1502< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1289( + __action1288( __temp0, __1, __2, @@ -58750,7 +58722,7 @@ fn __action1502< } #[allow(clippy::too_many_arguments)] -fn __action1503< +fn __action1502< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58771,7 +58743,7 @@ fn __action1503< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1289( + __action1288( __temp0, __3, __4, @@ -58783,7 +58755,7 @@ fn __action1503< } #[allow(clippy::too_many_arguments)] -fn __action1504< +fn __action1503< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58806,7 +58778,7 @@ fn __action1504< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1289( + __action1288( __temp0, __4, __5, @@ -58818,7 +58790,7 @@ fn __action1504< } #[allow(clippy::too_many_arguments)] -fn __action1505< +fn __action1504< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58834,7 +58806,7 @@ fn __action1505< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1290( + __action1289( __temp0, __1, __2, @@ -58845,7 +58817,7 @@ fn __action1505< } #[allow(clippy::too_many_arguments)] -fn __action1506< +fn __action1505< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58865,7 +58837,7 @@ fn __action1506< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1290( + __action1289( __temp0, __3, __4, @@ -58876,7 +58848,7 @@ fn __action1506< } #[allow(clippy::too_many_arguments)] -fn __action1507< +fn __action1506< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58898,7 +58870,7 @@ fn __action1507< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1290( + __action1289( __temp0, __4, __5, @@ -58909,7 +58881,7 @@ fn __action1507< } #[allow(clippy::too_many_arguments)] -fn __action1508< +fn __action1507< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58927,7 +58899,7 @@ fn __action1508< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1291( + __action1290( __temp0, __1, __2, @@ -58940,7 +58912,7 @@ fn __action1508< } #[allow(clippy::too_many_arguments)] -fn __action1509< +fn __action1508< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -58962,7 +58934,7 @@ fn __action1509< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1291( + __action1290( __temp0, __3, __4, @@ -58974,6 +58946,43 @@ fn __action1509< ) } +#[allow(clippy::too_many_arguments)] +fn __action1509< +>( + __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, ast::Arg, TextSize), + __7: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __8: (TextSize, token::Tok, TextSize), + __9: (TextSize, Option>, TextSize), + __10: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __3.2; + let __temp0 = __action659( + __0, + __1, + __2, + __3, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1290( + __temp0, + __4, + __5, + __6, + __7, + __8, + __9, + __10, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1510< >( @@ -58982,12 +58991,73 @@ fn __action1510< __2: (TextSize, token::Tok, TextSize), __3: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, ast::Arg, TextSize), - __7: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __5: (TextSize, Option>, TextSize), + __6: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action398( + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1291( + __temp0, + __1, + __2, + __3, + __4, + __5, + __6, + ) +} + +#[allow(clippy::too_many_arguments)] +fn __action1511< +>( + __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, token::Tok, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __6: (TextSize, token::Tok, TextSize), + __7: (TextSize, Option>, TextSize), __8: (TextSize, token::Tok, TextSize), - __9: (TextSize, Option>, TextSize), - __10: (TextSize, token::Tok, TextSize), +) -> Result> +{ + let __start0 = __0.0; + let __end0 = __2.2; + let __temp0 = __action658( + __0, + __1, + __2, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1291( + __temp0, + __3, + __4, + __5, + __6, + __7, + __8, + ) +} + +#[allow(clippy::too_many_arguments)] +fn __action1512< +>( + __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), + __1: (TextSize, token::Tok, TextSize), + __2: (TextSize, token::Tok, TextSize), + __3: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __4: (TextSize, token::Tok, TextSize), + __5: (TextSize, token::Tok, TextSize), + __6: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), + __7: (TextSize, token::Tok, TextSize), + __8: (TextSize, Option>, TextSize), + __9: (TextSize, token::Tok, TextSize), ) -> Result> { let __start0 = __0.0; @@ -59007,109 +59077,11 @@ fn __action1510< __7, __8, __9, - __10, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1511< ->( - __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, Option>, TextSize), - __6: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action398( - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1292( - __temp0, - __1, - __2, - __3, - __4, - __5, - __6, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1512< ->( - __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, token::Tok, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), - __6: (TextSize, token::Tok, TextSize), - __7: (TextSize, Option>, TextSize), - __8: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __2.2; - let __temp0 = __action658( - __0, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1292( - __temp0, - __3, - __4, - __5, - __6, - __7, - __8, ) } #[allow(clippy::too_many_arguments)] fn __action1513< ->( - __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), - __1: (TextSize, token::Tok, TextSize), - __2: (TextSize, token::Tok, TextSize), - __3: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), - __4: (TextSize, token::Tok, TextSize), - __5: (TextSize, token::Tok, TextSize), - __6: (TextSize, alloc::vec::Vec<(ast::Arg, Option)>, TextSize), - __7: (TextSize, token::Tok, TextSize), - __8: (TextSize, Option>, TextSize), - __9: (TextSize, token::Tok, TextSize), -) -> Result> -{ - let __start0 = __0.0; - let __end0 = __3.2; - let __temp0 = __action659( - __0, - __1, - __2, - __3, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1292( - __temp0, - __4, - __5, - __6, - __7, - __8, - __9, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1514< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59124,7 +59096,7 @@ fn __action1514< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1293( + __action1292( __temp0, __1, __2, @@ -59134,7 +59106,7 @@ fn __action1514< } #[allow(clippy::too_many_arguments)] -fn __action1515< +fn __action1514< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59153,7 +59125,7 @@ fn __action1515< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1293( + __action1292( __temp0, __3, __4, @@ -59163,7 +59135,7 @@ fn __action1515< } #[allow(clippy::too_many_arguments)] -fn __action1516< +fn __action1515< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59184,7 +59156,7 @@ fn __action1516< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1293( + __action1292( __temp0, __4, __5, @@ -59194,7 +59166,7 @@ fn __action1516< } #[allow(clippy::too_many_arguments)] -fn __action1517< +fn __action1516< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59208,7 +59180,7 @@ fn __action1517< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1294( + __action1293( __temp0, __1, __2, @@ -59217,7 +59189,7 @@ fn __action1517< } #[allow(clippy::too_many_arguments)] -fn __action1518< +fn __action1517< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59235,7 +59207,7 @@ fn __action1518< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1294( + __action1293( __temp0, __3, __4, @@ -59244,7 +59216,7 @@ fn __action1518< } #[allow(clippy::too_many_arguments)] -fn __action1519< +fn __action1518< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59264,7 +59236,7 @@ fn __action1519< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1294( + __action1293( __temp0, __4, __5, @@ -59273,7 +59245,7 @@ fn __action1519< } #[allow(clippy::too_many_arguments)] -fn __action1520< +fn __action1519< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59289,7 +59261,7 @@ fn __action1520< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1295( + __action1294( __temp0, __1, __2, @@ -59300,7 +59272,7 @@ fn __action1520< } #[allow(clippy::too_many_arguments)] -fn __action1521< +fn __action1520< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59320,7 +59292,7 @@ fn __action1521< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1295( + __action1294( __temp0, __3, __4, @@ -59331,7 +59303,7 @@ fn __action1521< } #[allow(clippy::too_many_arguments)] -fn __action1522< +fn __action1521< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59353,7 +59325,7 @@ fn __action1522< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1295( + __action1294( __temp0, __4, __5, @@ -59364,7 +59336,7 @@ fn __action1522< } #[allow(clippy::too_many_arguments)] -fn __action1523< +fn __action1522< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59379,7 +59351,7 @@ fn __action1523< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1296( + __action1295( __temp0, __1, __2, @@ -59389,7 +59361,7 @@ fn __action1523< } #[allow(clippy::too_many_arguments)] -fn __action1524< +fn __action1523< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59408,7 +59380,7 @@ fn __action1524< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1296( + __action1295( __temp0, __3, __4, @@ -59418,7 +59390,7 @@ fn __action1524< } #[allow(clippy::too_many_arguments)] -fn __action1525< +fn __action1524< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59439,7 +59411,7 @@ fn __action1525< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1296( + __action1295( __temp0, __4, __5, @@ -59449,7 +59421,7 @@ fn __action1525< } #[allow(clippy::too_many_arguments)] -fn __action1526< +fn __action1525< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59461,14 +59433,14 @@ fn __action1526< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1297( + __action1296( __temp0, __1, ) } #[allow(clippy::too_many_arguments)] -fn __action1527< +fn __action1526< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59484,14 +59456,14 @@ fn __action1527< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1297( + __action1296( __temp0, __3, ) } #[allow(clippy::too_many_arguments)] -fn __action1528< +fn __action1527< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59509,14 +59481,14 @@ fn __action1528< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1297( + __action1296( __temp0, __4, ) } #[allow(clippy::too_many_arguments)] -fn __action1529< +fn __action1528< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59532,7 +59504,7 @@ fn __action1529< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1298( + __action1297( __temp0, __1, __2, @@ -59543,7 +59515,7 @@ fn __action1529< } #[allow(clippy::too_many_arguments)] -fn __action1530< +fn __action1529< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59563,7 +59535,7 @@ fn __action1530< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1298( + __action1297( __temp0, __3, __4, @@ -59574,7 +59546,7 @@ fn __action1530< } #[allow(clippy::too_many_arguments)] -fn __action1531< +fn __action1530< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59596,7 +59568,7 @@ fn __action1531< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1298( + __action1297( __temp0, __4, __5, @@ -59607,7 +59579,7 @@ fn __action1531< } #[allow(clippy::too_many_arguments)] -fn __action1532< +fn __action1531< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59622,7 +59594,7 @@ fn __action1532< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1299( + __action1298( __temp0, __1, __2, @@ -59632,7 +59604,7 @@ fn __action1532< } #[allow(clippy::too_many_arguments)] -fn __action1533< +fn __action1532< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59651,7 +59623,7 @@ fn __action1533< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1299( + __action1298( __temp0, __3, __4, @@ -59661,7 +59633,7 @@ fn __action1533< } #[allow(clippy::too_many_arguments)] -fn __action1534< +fn __action1533< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59682,7 +59654,7 @@ fn __action1534< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1299( + __action1298( __temp0, __4, __5, @@ -59692,7 +59664,7 @@ fn __action1534< } #[allow(clippy::too_many_arguments)] -fn __action1535< +fn __action1534< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59709,7 +59681,7 @@ fn __action1535< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1300( + __action1299( __temp0, __1, __2, @@ -59721,7 +59693,7 @@ fn __action1535< } #[allow(clippy::too_many_arguments)] -fn __action1536< +fn __action1535< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59742,7 +59714,7 @@ fn __action1536< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1300( + __action1299( __temp0, __3, __4, @@ -59754,7 +59726,7 @@ fn __action1536< } #[allow(clippy::too_many_arguments)] -fn __action1537< +fn __action1536< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59777,7 +59749,7 @@ fn __action1537< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1300( + __action1299( __temp0, __4, __5, @@ -59789,7 +59761,7 @@ fn __action1537< } #[allow(clippy::too_many_arguments)] -fn __action1538< +fn __action1537< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59805,7 +59777,7 @@ fn __action1538< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1301( + __action1300( __temp0, __1, __2, @@ -59816,7 +59788,7 @@ fn __action1538< } #[allow(clippy::too_many_arguments)] -fn __action1539< +fn __action1538< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59836,7 +59808,7 @@ fn __action1539< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1301( + __action1300( __temp0, __3, __4, @@ -59847,7 +59819,7 @@ fn __action1539< } #[allow(clippy::too_many_arguments)] -fn __action1540< +fn __action1539< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59869,7 +59841,7 @@ fn __action1540< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1301( + __action1300( __temp0, __4, __5, @@ -59880,7 +59852,7 @@ fn __action1540< } #[allow(clippy::too_many_arguments)] -fn __action1541< +fn __action1540< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59894,7 +59866,7 @@ fn __action1541< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1302( + __action1301( __temp0, __1, __2, @@ -59903,7 +59875,7 @@ fn __action1541< } #[allow(clippy::too_many_arguments)] -fn __action1542< +fn __action1541< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59921,7 +59893,7 @@ fn __action1542< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1302( + __action1301( __temp0, __3, __4, @@ -59930,7 +59902,7 @@ fn __action1542< } #[allow(clippy::too_many_arguments)] -fn __action1543< +fn __action1542< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59950,7 +59922,7 @@ fn __action1543< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1302( + __action1301( __temp0, __4, __5, @@ -59959,7 +59931,7 @@ fn __action1543< } #[allow(clippy::too_many_arguments)] -fn __action1544< +fn __action1543< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59972,7 +59944,7 @@ fn __action1544< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1303( + __action1302( __temp0, __1, __2, @@ -59980,7 +59952,7 @@ fn __action1544< } #[allow(clippy::too_many_arguments)] -fn __action1545< +fn __action1544< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -59997,7 +59969,7 @@ fn __action1545< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1303( + __action1302( __temp0, __3, __4, @@ -60005,7 +59977,7 @@ fn __action1545< } #[allow(clippy::too_many_arguments)] -fn __action1546< +fn __action1545< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60024,7 +59996,7 @@ fn __action1546< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1303( + __action1302( __temp0, __4, __5, @@ -60032,7 +60004,7 @@ fn __action1546< } #[allow(clippy::too_many_arguments)] -fn __action1547< +fn __action1546< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60047,7 +60019,7 @@ fn __action1547< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1304( + __action1303( __temp0, __1, __2, @@ -60057,7 +60029,7 @@ fn __action1547< } #[allow(clippy::too_many_arguments)] -fn __action1548< +fn __action1547< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60076,7 +60048,7 @@ fn __action1548< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1304( + __action1303( __temp0, __3, __4, @@ -60086,7 +60058,7 @@ fn __action1548< } #[allow(clippy::too_many_arguments)] -fn __action1549< +fn __action1548< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60107,7 +60079,7 @@ fn __action1549< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1304( + __action1303( __temp0, __4, __5, @@ -60117,7 +60089,7 @@ fn __action1549< } #[allow(clippy::too_many_arguments)] -fn __action1550< +fn __action1549< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60131,7 +60103,7 @@ fn __action1550< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1305( + __action1304( __temp0, __1, __2, @@ -60140,7 +60112,7 @@ fn __action1550< } #[allow(clippy::too_many_arguments)] -fn __action1551< +fn __action1550< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60158,7 +60130,7 @@ fn __action1551< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1305( + __action1304( __temp0, __3, __4, @@ -60167,7 +60139,7 @@ fn __action1551< } #[allow(clippy::too_many_arguments)] -fn __action1552< +fn __action1551< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60187,7 +60159,7 @@ fn __action1552< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1305( + __action1304( __temp0, __4, __5, @@ -60196,7 +60168,7 @@ fn __action1552< } #[allow(clippy::too_many_arguments)] -fn __action1553< +fn __action1552< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), ) -> Result> @@ -60207,13 +60179,13 @@ fn __action1553< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1306( + __action1305( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1554< +fn __action1553< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60228,13 +60200,13 @@ fn __action1554< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1306( + __action1305( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1555< +fn __action1554< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60251,13 +60223,13 @@ fn __action1555< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1306( + __action1305( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1556< +fn __action1555< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60271,7 +60243,7 @@ fn __action1556< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1307( + __action1306( __temp0, __1, __2, @@ -60280,7 +60252,7 @@ fn __action1556< } #[allow(clippy::too_many_arguments)] -fn __action1557< +fn __action1556< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60298,7 +60270,7 @@ fn __action1557< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1307( + __action1306( __temp0, __3, __4, @@ -60307,7 +60279,7 @@ fn __action1557< } #[allow(clippy::too_many_arguments)] -fn __action1558< +fn __action1557< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60327,7 +60299,7 @@ fn __action1558< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1307( + __action1306( __temp0, __4, __5, @@ -60336,7 +60308,7 @@ fn __action1558< } #[allow(clippy::too_many_arguments)] -fn __action1559< +fn __action1558< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60349,7 +60321,7 @@ fn __action1559< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1308( + __action1307( __temp0, __1, __2, @@ -60357,7 +60329,7 @@ fn __action1559< } #[allow(clippy::too_many_arguments)] -fn __action1560< +fn __action1559< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60374,7 +60346,7 @@ fn __action1560< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1308( + __action1307( __temp0, __3, __4, @@ -60382,7 +60354,7 @@ fn __action1560< } #[allow(clippy::too_many_arguments)] -fn __action1561< +fn __action1560< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60401,7 +60373,7 @@ fn __action1561< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1308( + __action1307( __temp0, __4, __5, @@ -60409,7 +60381,7 @@ fn __action1561< } #[allow(clippy::too_many_arguments)] -fn __action1562< +fn __action1561< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60426,7 +60398,7 @@ fn __action1562< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1326( __temp0, __1, __2, @@ -60438,7 +60410,7 @@ fn __action1562< } #[allow(clippy::too_many_arguments)] -fn __action1563< +fn __action1562< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60459,7 +60431,7 @@ fn __action1563< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1326( __temp0, __3, __4, @@ -60471,7 +60443,7 @@ fn __action1563< } #[allow(clippy::too_many_arguments)] -fn __action1564< +fn __action1563< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60494,7 +60466,7 @@ fn __action1564< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1327( + __action1326( __temp0, __4, __5, @@ -60506,7 +60478,7 @@ fn __action1564< } #[allow(clippy::too_many_arguments)] -fn __action1565< +fn __action1564< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60522,7 +60494,7 @@ fn __action1565< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1327( __temp0, __1, __2, @@ -60533,7 +60505,7 @@ fn __action1565< } #[allow(clippy::too_many_arguments)] -fn __action1566< +fn __action1565< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60553,7 +60525,7 @@ fn __action1566< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1327( __temp0, __3, __4, @@ -60564,7 +60536,7 @@ fn __action1566< } #[allow(clippy::too_many_arguments)] -fn __action1567< +fn __action1566< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60586,7 +60558,7 @@ fn __action1567< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1328( + __action1327( __temp0, __4, __5, @@ -60597,7 +60569,7 @@ fn __action1567< } #[allow(clippy::too_many_arguments)] -fn __action1568< +fn __action1567< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60615,7 +60587,7 @@ fn __action1568< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1328( __temp0, __1, __2, @@ -60628,7 +60600,7 @@ fn __action1568< } #[allow(clippy::too_many_arguments)] -fn __action1569< +fn __action1568< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60650,7 +60622,7 @@ fn __action1569< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1328( __temp0, __3, __4, @@ -60663,7 +60635,7 @@ fn __action1569< } #[allow(clippy::too_many_arguments)] -fn __action1570< +fn __action1569< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60687,7 +60659,7 @@ fn __action1570< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1329( + __action1328( __temp0, __4, __5, @@ -60700,7 +60672,7 @@ fn __action1570< } #[allow(clippy::too_many_arguments)] -fn __action1571< +fn __action1570< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60717,7 +60689,7 @@ fn __action1571< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1329( __temp0, __1, __2, @@ -60729,7 +60701,7 @@ fn __action1571< } #[allow(clippy::too_many_arguments)] -fn __action1572< +fn __action1571< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60750,7 +60722,7 @@ fn __action1572< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1329( __temp0, __3, __4, @@ -60762,7 +60734,7 @@ fn __action1572< } #[allow(clippy::too_many_arguments)] -fn __action1573< +fn __action1572< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60785,7 +60757,7 @@ fn __action1573< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1330( + __action1329( __temp0, __4, __5, @@ -60797,7 +60769,7 @@ fn __action1573< } #[allow(clippy::too_many_arguments)] -fn __action1574< +fn __action1573< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60812,7 +60784,7 @@ fn __action1574< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1330( __temp0, __1, __2, @@ -60822,7 +60794,7 @@ fn __action1574< } #[allow(clippy::too_many_arguments)] -fn __action1575< +fn __action1574< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60841,7 +60813,7 @@ fn __action1575< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1330( __temp0, __3, __4, @@ -60851,7 +60823,7 @@ fn __action1575< } #[allow(clippy::too_many_arguments)] -fn __action1576< +fn __action1575< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60872,7 +60844,7 @@ fn __action1576< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1331( + __action1330( __temp0, __4, __5, @@ -60882,7 +60854,7 @@ fn __action1576< } #[allow(clippy::too_many_arguments)] -fn __action1577< +fn __action1576< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60896,7 +60868,7 @@ fn __action1577< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1331( __temp0, __1, __2, @@ -60905,7 +60877,7 @@ fn __action1577< } #[allow(clippy::too_many_arguments)] -fn __action1578< +fn __action1577< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60923,7 +60895,7 @@ fn __action1578< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1331( __temp0, __3, __4, @@ -60932,7 +60904,7 @@ fn __action1578< } #[allow(clippy::too_many_arguments)] -fn __action1579< +fn __action1578< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60952,7 +60924,7 @@ fn __action1579< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1332( + __action1331( __temp0, __4, __5, @@ -60961,7 +60933,7 @@ fn __action1579< } #[allow(clippy::too_many_arguments)] -fn __action1580< +fn __action1579< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -60977,7 +60949,7 @@ fn __action1580< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1333( + __action1332( __temp0, __1, __2, @@ -60988,7 +60960,7 @@ fn __action1580< } #[allow(clippy::too_many_arguments)] -fn __action1581< +fn __action1580< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61008,7 +60980,7 @@ fn __action1581< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1333( + __action1332( __temp0, __3, __4, @@ -61019,7 +60991,7 @@ fn __action1581< } #[allow(clippy::too_many_arguments)] -fn __action1582< +fn __action1581< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61041,7 +61013,7 @@ fn __action1582< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1333( + __action1332( __temp0, __4, __5, @@ -61052,7 +61024,7 @@ fn __action1582< } #[allow(clippy::too_many_arguments)] -fn __action1583< +fn __action1582< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61067,7 +61039,7 @@ fn __action1583< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1334( + __action1333( __temp0, __1, __2, @@ -61077,7 +61049,7 @@ fn __action1583< } #[allow(clippy::too_many_arguments)] -fn __action1584< +fn __action1583< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61096,7 +61068,7 @@ fn __action1584< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1334( + __action1333( __temp0, __3, __4, @@ -61106,7 +61078,7 @@ fn __action1584< } #[allow(clippy::too_many_arguments)] -fn __action1585< +fn __action1584< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61127,7 +61099,7 @@ fn __action1585< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1334( + __action1333( __temp0, __4, __5, @@ -61137,7 +61109,7 @@ fn __action1585< } #[allow(clippy::too_many_arguments)] -fn __action1586< +fn __action1585< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61149,14 +61121,14 @@ fn __action1586< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1334( __temp0, __1, ) } #[allow(clippy::too_many_arguments)] -fn __action1587< +fn __action1586< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61172,14 +61144,14 @@ fn __action1587< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1334( __temp0, __3, ) } #[allow(clippy::too_many_arguments)] -fn __action1588< +fn __action1587< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61197,14 +61169,14 @@ fn __action1588< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1335( + __action1334( __temp0, __4, ) } #[allow(clippy::too_many_arguments)] -fn __action1589< +fn __action1588< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61220,7 +61192,7 @@ fn __action1589< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1335( __temp0, __1, __2, @@ -61231,7 +61203,7 @@ fn __action1589< } #[allow(clippy::too_many_arguments)] -fn __action1590< +fn __action1589< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61251,7 +61223,7 @@ fn __action1590< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1335( __temp0, __3, __4, @@ -61262,7 +61234,7 @@ fn __action1590< } #[allow(clippy::too_many_arguments)] -fn __action1591< +fn __action1590< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61284,7 +61256,7 @@ fn __action1591< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1336( + __action1335( __temp0, __4, __5, @@ -61295,7 +61267,7 @@ fn __action1591< } #[allow(clippy::too_many_arguments)] -fn __action1592< +fn __action1591< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61310,7 +61282,7 @@ fn __action1592< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1336( __temp0, __1, __2, @@ -61320,7 +61292,7 @@ fn __action1592< } #[allow(clippy::too_many_arguments)] -fn __action1593< +fn __action1592< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61339,7 +61311,7 @@ fn __action1593< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1336( __temp0, __3, __4, @@ -61349,7 +61321,7 @@ fn __action1593< } #[allow(clippy::too_many_arguments)] -fn __action1594< +fn __action1593< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61370,7 +61342,7 @@ fn __action1594< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1337( + __action1336( __temp0, __4, __5, @@ -61380,7 +61352,7 @@ fn __action1594< } #[allow(clippy::too_many_arguments)] -fn __action1595< +fn __action1594< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61397,7 +61369,7 @@ fn __action1595< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1337( __temp0, __1, __2, @@ -61409,7 +61381,7 @@ fn __action1595< } #[allow(clippy::too_many_arguments)] -fn __action1596< +fn __action1595< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61430,7 +61402,7 @@ fn __action1596< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1337( __temp0, __3, __4, @@ -61442,7 +61414,7 @@ fn __action1596< } #[allow(clippy::too_many_arguments)] -fn __action1597< +fn __action1596< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61465,7 +61437,7 @@ fn __action1597< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1338( + __action1337( __temp0, __4, __5, @@ -61477,7 +61449,7 @@ fn __action1597< } #[allow(clippy::too_many_arguments)] -fn __action1598< +fn __action1597< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61493,7 +61465,7 @@ fn __action1598< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1338( __temp0, __1, __2, @@ -61504,7 +61476,7 @@ fn __action1598< } #[allow(clippy::too_many_arguments)] -fn __action1599< +fn __action1598< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61524,7 +61496,7 @@ fn __action1599< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1338( __temp0, __3, __4, @@ -61535,7 +61507,7 @@ fn __action1599< } #[allow(clippy::too_many_arguments)] -fn __action1600< +fn __action1599< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61557,7 +61529,7 @@ fn __action1600< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1339( + __action1338( __temp0, __4, __5, @@ -61568,7 +61540,7 @@ fn __action1600< } #[allow(clippy::too_many_arguments)] -fn __action1601< +fn __action1600< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61582,7 +61554,7 @@ fn __action1601< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1339( __temp0, __1, __2, @@ -61591,7 +61563,7 @@ fn __action1601< } #[allow(clippy::too_many_arguments)] -fn __action1602< +fn __action1601< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61609,7 +61581,7 @@ fn __action1602< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1339( __temp0, __3, __4, @@ -61618,7 +61590,7 @@ fn __action1602< } #[allow(clippy::too_many_arguments)] -fn __action1603< +fn __action1602< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61638,7 +61610,7 @@ fn __action1603< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1340( + __action1339( __temp0, __4, __5, @@ -61647,7 +61619,7 @@ fn __action1603< } #[allow(clippy::too_many_arguments)] -fn __action1604< +fn __action1603< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61660,7 +61632,7 @@ fn __action1604< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1340( __temp0, __1, __2, @@ -61668,7 +61640,7 @@ fn __action1604< } #[allow(clippy::too_many_arguments)] -fn __action1605< +fn __action1604< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61685,7 +61657,7 @@ fn __action1605< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1340( __temp0, __3, __4, @@ -61693,7 +61665,7 @@ fn __action1605< } #[allow(clippy::too_many_arguments)] -fn __action1606< +fn __action1605< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61712,7 +61684,7 @@ fn __action1606< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1341( + __action1340( __temp0, __4, __5, @@ -61720,7 +61692,7 @@ fn __action1606< } #[allow(clippy::too_many_arguments)] -fn __action1607< +fn __action1606< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61735,7 +61707,7 @@ fn __action1607< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1342( + __action1341( __temp0, __1, __2, @@ -61745,7 +61717,7 @@ fn __action1607< } #[allow(clippy::too_many_arguments)] -fn __action1608< +fn __action1607< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61764,7 +61736,7 @@ fn __action1608< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1342( + __action1341( __temp0, __3, __4, @@ -61774,7 +61746,7 @@ fn __action1608< } #[allow(clippy::too_many_arguments)] -fn __action1609< +fn __action1608< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61795,7 +61767,7 @@ fn __action1609< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1342( + __action1341( __temp0, __4, __5, @@ -61805,7 +61777,7 @@ fn __action1609< } #[allow(clippy::too_many_arguments)] -fn __action1610< +fn __action1609< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61819,7 +61791,7 @@ fn __action1610< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1343( + __action1342( __temp0, __1, __2, @@ -61828,7 +61800,7 @@ fn __action1610< } #[allow(clippy::too_many_arguments)] -fn __action1611< +fn __action1610< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61846,7 +61818,7 @@ fn __action1611< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1343( + __action1342( __temp0, __3, __4, @@ -61855,7 +61827,7 @@ fn __action1611< } #[allow(clippy::too_many_arguments)] -fn __action1612< +fn __action1611< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61875,7 +61847,7 @@ fn __action1612< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1343( + __action1342( __temp0, __4, __5, @@ -61884,7 +61856,7 @@ fn __action1612< } #[allow(clippy::too_many_arguments)] -fn __action1613< +fn __action1612< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), ) -> Result> @@ -61895,13 +61867,13 @@ fn __action1613< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1344( + __action1343( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1614< +fn __action1613< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61916,13 +61888,13 @@ fn __action1614< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1344( + __action1343( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1615< +fn __action1614< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61939,13 +61911,13 @@ fn __action1615< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1344( + __action1343( __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1616< +fn __action1615< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61959,7 +61931,7 @@ fn __action1616< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1345( + __action1344( __temp0, __1, __2, @@ -61968,7 +61940,7 @@ fn __action1616< } #[allow(clippy::too_many_arguments)] -fn __action1617< +fn __action1616< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -61986,7 +61958,7 @@ fn __action1617< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1345( + __action1344( __temp0, __3, __4, @@ -61995,7 +61967,7 @@ fn __action1617< } #[allow(clippy::too_many_arguments)] -fn __action1618< +fn __action1617< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62015,7 +61987,7 @@ fn __action1618< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1345( + __action1344( __temp0, __4, __5, @@ -62024,7 +61996,7 @@ fn __action1618< } #[allow(clippy::too_many_arguments)] -fn __action1619< +fn __action1618< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62037,7 +62009,7 @@ fn __action1619< __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1346( + __action1345( __temp0, __1, __2, @@ -62045,7 +62017,7 @@ fn __action1619< } #[allow(clippy::too_many_arguments)] -fn __action1620< +fn __action1619< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62062,7 +62034,7 @@ fn __action1620< __2, ); let __temp0 = (__start0, __temp0, __end0); - __action1346( + __action1345( __temp0, __3, __4, @@ -62070,7 +62042,7 @@ fn __action1620< } #[allow(clippy::too_many_arguments)] -fn __action1621< +fn __action1620< >( __0: (TextSize, Vec<(ast::Arg, Option)>, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62089,7 +62061,7 @@ fn __action1621< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1346( + __action1345( __temp0, __4, __5, @@ -62097,7 +62069,7 @@ fn __action1621< } #[allow(clippy::too_many_arguments)] -fn __action1622< +fn __action1621< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arguments, TextSize), @@ -62120,7 +62092,7 @@ fn __action1622< } #[allow(clippy::too_many_arguments)] -fn __action1623< +fn __action1622< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62143,7 +62115,7 @@ fn __action1623< } #[allow(clippy::too_many_arguments)] -fn __action1624< +fn __action1623< >( __0: (TextSize, core::option::Option, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62157,7 +62129,7 @@ fn __action1624< __3, ); let __temp0 = (__start0, __temp0, __end0); - __action1389( + __action1388( __0, __1, __2, @@ -62166,7 +62138,7 @@ fn __action1624< } #[allow(clippy::too_many_arguments)] -fn __action1625< +fn __action1624< >( __0: (TextSize, core::option::Option, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62180,7 +62152,7 @@ fn __action1625< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1389( + __action1388( __0, __1, __2, @@ -62189,7 +62161,7 @@ fn __action1625< } #[allow(clippy::too_many_arguments)] -fn __action1626< +fn __action1625< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62212,7 +62184,7 @@ fn __action1626< } #[allow(clippy::too_many_arguments)] -fn __action1627< +fn __action1626< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62235,7 +62207,7 @@ fn __action1627< } #[allow(clippy::too_many_arguments)] -fn __action1628< +fn __action1627< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62254,7 +62226,7 @@ fn __action1628< } #[allow(clippy::too_many_arguments)] -fn __action1629< +fn __action1628< >( __0: (TextSize, token::Tok, TextSize), ) -> Option @@ -62273,7 +62245,7 @@ fn __action1629< } #[allow(clippy::too_many_arguments)] -fn __action1630< +fn __action1629< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62293,7 +62265,7 @@ fn __action1630< __2, ); let __temp1 = (__start1, __temp1, __end1); - __action1624( + __action1623( __temp0, __1, __temp1, @@ -62302,7 +62274,7 @@ fn __action1630< } #[allow(clippy::too_many_arguments)] -fn __action1631< +fn __action1630< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62322,7 +62294,7 @@ fn __action1631< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1624( + __action1623( __temp0, __1, __temp1, @@ -62331,7 +62303,7 @@ fn __action1631< } #[allow(clippy::too_many_arguments)] -fn __action1632< +fn __action1631< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62351,7 +62323,7 @@ fn __action1632< __1, ); let __temp1 = (__start1, __temp1, __end1); - __action1624( + __action1623( __temp0, __0, __temp1, @@ -62360,7 +62332,7 @@ fn __action1632< } #[allow(clippy::too_many_arguments)] -fn __action1633< +fn __action1632< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, Option, TextSize), @@ -62380,7 +62352,7 @@ fn __action1633< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1624( + __action1623( __temp0, __0, __temp1, @@ -62389,7 +62361,7 @@ fn __action1633< } #[allow(clippy::too_many_arguments)] -fn __action1634< +fn __action1633< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62408,7 +62380,7 @@ fn __action1634< __2, ); let __temp1 = (__start1, __temp1, __end1); - __action1625( + __action1624( __temp0, __1, __temp1, @@ -62416,7 +62388,7 @@ fn __action1634< } #[allow(clippy::too_many_arguments)] -fn __action1635< +fn __action1634< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62435,7 +62407,7 @@ fn __action1635< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1625( + __action1624( __temp0, __1, __temp1, @@ -62443,7 +62415,7 @@ fn __action1635< } #[allow(clippy::too_many_arguments)] -fn __action1636< +fn __action1635< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62462,7 +62434,7 @@ fn __action1636< __1, ); let __temp1 = (__start1, __temp1, __end1); - __action1625( + __action1624( __temp0, __0, __temp1, @@ -62470,7 +62442,7 @@ fn __action1636< } #[allow(clippy::too_many_arguments)] -fn __action1637< +fn __action1636< >( __0: (TextSize, token::Tok, TextSize), ) -> ast::Expr @@ -62489,7 +62461,7 @@ fn __action1637< &__end1, ); let __temp1 = (__start1, __temp1, __end1); - __action1625( + __action1624( __temp0, __0, __temp1, @@ -62497,7 +62469,7 @@ fn __action1637< } #[allow(clippy::too_many_arguments)] -fn __action1638< +fn __action1637< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62532,7 +62504,7 @@ fn __action1638< } #[allow(clippy::too_many_arguments)] -fn __action1639< +fn __action1638< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, token::Tok, TextSize), @@ -62561,7 +62533,7 @@ fn __action1639< } #[allow(clippy::too_many_arguments)] -fn __action1640< +fn __action1639< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62594,7 +62566,7 @@ fn __action1640< } #[allow(clippy::too_many_arguments)] -fn __action1641< +fn __action1640< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62621,7 +62593,7 @@ fn __action1641< } #[allow(clippy::too_many_arguments)] -fn __action1642< +fn __action1641< >( __0: (TextSize, ast::Expr, TextSize), ) -> core::option::Option @@ -62638,7 +62610,7 @@ fn __action1642< } #[allow(clippy::too_many_arguments)] -fn __action1643< +fn __action1642< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Expr @@ -62655,7 +62627,7 @@ fn __action1643< } #[allow(clippy::too_many_arguments)] -fn __action1644< +fn __action1643< >( __0: (TextSize, ast::Expr, TextSize), ) -> ast::Expr @@ -62672,7 +62644,7 @@ fn __action1644< } #[allow(clippy::too_many_arguments)] -fn __action1645< +fn __action1644< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62684,14 +62656,14 @@ fn __action1645< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1400( + __action1399( __0, __temp0, ) } #[allow(clippy::too_many_arguments)] -fn __action1646< +fn __action1645< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62704,7 +62676,7 @@ fn __action1646< __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1401( + __action1400( __0, __temp0, __2, @@ -62712,7 +62684,7 @@ fn __action1646< } #[allow(clippy::too_many_arguments)] -fn __action1647< +fn __action1646< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Expr, TextSize), @@ -62720,7 +62692,7 @@ fn __action1647< { let __start0 = __1.0; let __end0 = __1.2; - let __temp0 = __action1642( + let __temp0 = __action1641( __1, ); let __temp0 = (__start0, __temp0, __end0); @@ -62730,20 +62702,39 @@ fn __action1647< ) } +#[allow(clippy::too_many_arguments)] +fn __action1647< +>( + __0: (TextSize, token::Tok, TextSize), +) -> ast::Stmt +{ + let __start0 = __0.2; + let __end0 = __0.2; + let __temp0 = __action354( + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1240( + __0, + __temp0, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1648< >( __0: (TextSize, token::Tok, TextSize), -) -> ast::Stmt + __1: (TextSize, ast::Expr, TextSize), +) -> ast::Expr { - let __start0 = __0.2; - let __end0 = __0.2; - let __temp0 = __action354( - &__start0, - &__end0, + let __start0 = __1.0; + let __end0 = __1.2; + let __temp0 = __action1641( + __1, ); let __temp0 = (__start0, __temp0, __end0); - __action1240( + __action1421( __0, __temp0, ) @@ -62751,25 +62742,6 @@ fn __action1648< #[allow(clippy::too_many_arguments)] fn __action1649< ->( - __0: (TextSize, token::Tok, TextSize), - __1: (TextSize, ast::Expr, TextSize), -) -> ast::Expr -{ - let __start0 = __1.0; - let __end0 = __1.2; - let __temp0 = __action1642( - __1, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1422( - __0, - __temp0, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1650< >( __0: (TextSize, token::Tok, TextSize), ) -> ast::Expr @@ -62781,31 +62753,31 @@ fn __action1650< &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action1422( + __action1421( __0, __temp0, ) } +#[allow(clippy::too_many_arguments)] +fn __action1650< +>( + __0: (TextSize, ast::Expr, TextSize), +) -> ast::Stmt +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action1643( + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1445( + __temp0, + ) +} + #[allow(clippy::too_many_arguments)] fn __action1651< ->( - __0: (TextSize, ast::Expr, TextSize), -) -> ast::Stmt -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action1644( - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1446( - __temp0, - ) -} - -#[allow(clippy::too_many_arguments)] -fn __action1652< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, alloc::vec::Vec, TextSize), @@ -62813,18 +62785,18 @@ fn __action1652< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1644( + let __temp0 = __action1643( __0, ); let __temp0 = (__start0, __temp0, __end0); - __action1447( + __action1446( __temp0, __1, ) } #[allow(clippy::too_many_arguments)] -fn __action1653< +fn __action1652< >( __0: (TextSize, ast::Expr, TextSize), __1: (TextSize, ast::Operator, TextSize), @@ -62833,7 +62805,7 @@ fn __action1653< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action1644( + let __temp0 = __action1643( __0, ); let __temp0 = (__start0, __temp0, __end0); @@ -62845,7 +62817,7 @@ fn __action1653< } #[allow(clippy::too_many_arguments)] -fn __action1654< +fn __action1653< >( __0: (TextSize, token::Tok, TextSize), __1: (TextSize, ast::Arg, TextSize), @@ -62864,7 +62836,7 @@ fn __action1654< } #[allow(clippy::too_many_arguments)] -fn __action1655< +fn __action1654< >( __0: (TextSize, token::Tok, TextSize), ) -> Option> diff --git a/parser/src/string.rs b/parser/src/string.rs index f575dc3..cb2b0e1 100644 --- a/parser/src/string.rs +++ b/parser/src/string.rs @@ -7,7 +7,7 @@ use crate::text_size::TextRange; use crate::{ ast::{self, Constant, Expr}, lexer::{LexicalError, LexicalErrorType}, - parser::{parse_expression_starts_at, LalrpopError, ParseError, ParseErrorType}, + parser::{LalrpopError, Parse, ParseError, ParseErrorType}, token::{StringKind, Tok}, }; use itertools::Itertools; @@ -591,7 +591,7 @@ impl<'a> StringParser<'a> { fn parse_fstring_expr(source: &str, location: TextSize) -> Result { let fstring_body = format!("({source})"); let start = location - TextSize::from(1); - parse_expression_starts_at(&fstring_body, "", start) + ast::Expr::parse_starts_at(&fstring_body, "", start) } fn parse_string( @@ -815,7 +815,7 @@ impl From for LalrpopError { #[cfg(test)] mod tests { use super::*; - use crate::parser::parse_program; + use crate::{ast, Parse}; fn parse_fstring(source: &str) -> Result, LexicalError> { StringParser::new( @@ -957,63 +957,63 @@ mod tests { #[test] fn test_parse_string_concat() { let source = "'Hello ' 'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_u_string_concat_1() { let source = "'Hello ' u'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_u_string_concat_2() { let source = "u'Hello ' 'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_f_string_concat_1() { let source = "'Hello ' f'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_f_string_concat_2() { let source = "'Hello ' f'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_f_string_concat_3() { let source = "'Hello ' f'world{\"!\"}'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_u_f_string_concat_1() { let source = "u'Hello ' f'world'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_u_f_string_concat_2() { let source = "u'Hello ' f'world' '!'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_parse_string_triple_quotes_with_kind() { let source = "u'''Hello, world!'''"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1021,7 +1021,7 @@ mod tests { fn test_single_quoted_byte() { // single quote let source = r##"b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'"##; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1029,7 +1029,7 @@ mod tests { fn test_double_quoted_byte() { // double quote let source = r##"b"\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff""##; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1037,35 +1037,35 @@ mod tests { fn test_escape_char_in_byte_literal() { // backslash does not escape let source = r##"b"omkmok\Xaa""##; // spell-checker:ignore omkmok - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_raw_byte_literal_1() { let source = r"rb'\x1z'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_raw_byte_literal_2() { let source = r"rb'\\'"; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_escape_octet() { let source = r##"b'\43a\4\1234'"##; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_fstring_escaped_newline() { let source = r#"f"\n{x}""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1073,28 +1073,28 @@ mod tests { fn test_fstring_unescaped_newline() { let source = r#"f""" {x}""""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_fstring_escaped_character() { let source = r#"f"\\{x}""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_raw_fstring() { let source = r#"rf"{x}""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } #[test] fn test_triple_quoted_raw_fstring() { let source = r#"rf"""{x}""""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1102,7 +1102,7 @@ mod tests { fn test_fstring_line_continuation() { let source = r#"rf"\ {x}""#; - let parse_ast = parse_program(source, "").unwrap(); + let parse_ast = ast::Suite::parse(source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } @@ -1112,7 +1112,7 @@ mod tests { #[test] fn $name() { let source = format!(r#""\N{{{0}}}""#, $alias); - let parse_ast = parse_program(&source, "").unwrap(); + let parse_ast = ast::Suite::parse(&source, "").unwrap(); insta::assert_debug_snapshot!(parse_ast); } )* diff --git a/scripts/update_asdl.sh b/scripts/update_asdl.sh index f2e3db2..af34cd2 100755 --- a/scripts/update_asdl.sh +++ b/scripts/update_asdl.sh @@ -4,5 +4,5 @@ set -e cd "$(dirname "$(dirname "$0")")" # rm ast/src/gen/*.rs -python ast/asdl_rs.py --ast-dir ast/src/gen/ --module-file ../RustPython/vm/src/stdlib/ast/gen.rs ast/Python.asdl -rustfmt ast/src/gen/*.rs ../RustPython/vm/src/stdlib/ast/gen.rs +python ast/asdl_rs.py --ast-dir ast/src/gen/ --ast-pyo3-dir ast-pyo3/src/gen/ --module-file ../RustPython/vm/src/stdlib/ast/gen.rs ast/Python.asdl +rustfmt ast/src/gen/*.rs ast-pyo3/src/gen/*.rs ../RustPython/vm/src/stdlib/ast/gen.rs