Update ASTree.cpp

Co-authored-by: Michael Hansen <zrax0111@gmail.com>
This commit is contained in:
ncaklovic
2024-02-28 12:34:32 +01:00
committed by GitHub
parent 28b62b6534
commit 32c1ca10bb

View File

@@ -1473,9 +1473,7 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
{
PycRef<ASTNode> name = stack.top();
if (name.type() != ASTNode::NODE_IMPORT) {
auto arg = operand;
if (mod->verCompare(3, 12) >= 0 && (arg & 1))
arg >>= 1;
auto arg = (mod->verCompare(3, 12) >= 0) ? operand >> 1 : operand;
stack.pop();
stack.push(new ASTBinary(name, new ASTName(code->getName(arg)), ASTBinary::BIN_ATTR));
}