diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-08-21 16:31:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 16:31:30 (GMT) |
commit | 10a91d7e98d847b05292eab828ff9ae51308d3ee (patch) | |
tree | a81f95a971c03710f13217cf89e0f12532341af8 /Parser | |
parent | 47022a079eb9d2a2af781abae3de4a71f80247c2 (diff) | |
download | cpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.zip cpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.tar.gz cpython-10a91d7e98d847b05292eab828ff9ae51308d3ee.tar.bz2 |
gh-108113: Make it possible to create an optimized AST (#108154)
Diffstat (limited to 'Parser')
-rwxr-xr-x | Parser/asdl_c.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 2a36610..1733cd4 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -1208,6 +1208,9 @@ class ASTModuleVisitor(PickleVisitor): self.emit('if (PyModule_AddIntMacro(m, PyCF_TYPE_COMMENTS) < 0) {', 1) self.emit("return -1;", 2) self.emit('}', 1) + self.emit('if (PyModule_AddIntMacro(m, PyCF_OPTIMIZED_AST) < 0) {', 1) + self.emit("return -1;", 2) + self.emit('}', 1) for dfn in mod.dfns: self.visit(dfn) self.emit("return 0;", 1) |