diff --git a/ASTree.cpp b/ASTree.cpp index 63a894e..c2794d3 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -2419,6 +2419,9 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) case Pyc::PUSH_NULL: stack.push(nullptr); break; + case Pyc::GEN_START_A: + stack.pop(); + break; default: fprintf(stderr, "Unsupported opcode: %s\n", Pyc::OpcodeName(opcode & 0xFF)); cleanBuild = false; diff --git a/tests/compiled/GEN_START.3.10.pyc b/tests/compiled/GEN_START.3.10.pyc new file mode 100644 index 0000000..bacb609 Binary files /dev/null and b/tests/compiled/GEN_START.3.10.pyc differ diff --git a/tests/input/GEN_START.py b/tests/input/GEN_START.py new file mode 100644 index 0000000..d4b2b35 --- /dev/null +++ b/tests/input/GEN_START.py @@ -0,0 +1,2 @@ +def GEN_START(): + yield 0 diff --git a/tests/tokenized/GEN_START.txt b/tests/tokenized/GEN_START.txt new file mode 100644 index 0000000..8f5a315 --- /dev/null +++ b/tests/tokenized/GEN_START.txt @@ -0,0 +1,3 @@ +def GEN_START ( ) : + +yield 0