mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-08 05:35:22 +00:00
working
This commit is contained in:
parent
c9924fcc39
commit
269a9a98da
2 changed files with 5 additions and 2 deletions
|
@ -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,
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue