This commit is contained in:
Jeong YunWon 2023-05-15 18:03:34 +09:00
parent c9924fcc39
commit 269a9a98da
2 changed files with 5 additions and 2 deletions

View file

@ -1663,6 +1663,7 @@ def write_ast_mod(mod, type_info, f):
def main(
input_filename,
ast_dir,
pyo3_dir,
module_filename,
dump_module=False,
):
@ -1712,6 +1713,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", "--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")
@ -1719,6 +1721,7 @@ if __name__ == "__main__":
main(
args.input_file,
args.ast_dir,
args.pyo3_dir,
args.module_file,
args.dump_module,
)

View file

@ -3,5 +3,5 @@ set -e
cd "$(dirname "$(dirname "$0")")"
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/Python.asdl --ast-dir ast/src/gen/ --module-file ../RustPython/vm/src/stdlib/ast/gen.rs --pyo3-dir parser-pyo3/src/gen/
rustfmt ast/src/gen/*.rs ../RustPython/vm/src/stdlib/ast/gen.rs