Remove subscript binary op fragments since this had a dedicated node type

This commit is contained in:
Michael Hansen
2010-09-03 21:56:29 -07:00
parent 7ffa2562c3
commit ea615df200
3 changed files with 2 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ const char* ASTBinary::op_str() const
".", " ** ", " * ", " / ", " // ", " % ", " + ", " - ", ".", " ** ", " * ", " / ", " // ", " % ", " + ", " - ",
" << ", " >> ", " & ", " ^ ", " | ", " and ", " or ", " << ", " >> ", " & ", " ^ ", " | ", " and ", " or ",
" += ", " -= ", " *= ", " /= ", " %= ", " **= ", " <<= ", " += ", " -= ", " *= ", " /= ", " %= ", " **= ", " <<= ",
" >>= ", " &= ", " ^= ", " |= ", " //= ", "[" " >>= ", " &= ", " ^= ", " |= ", " //= "
}; };
return s_op_strings[op()]; return s_op_strings[op()];
} }

View File

@@ -97,7 +97,7 @@ public:
BIN_OR, BIN_LOG_AND, BIN_LOG_OR, BIN_IP_ADD, BIN_IP_SUBTRACT, BIN_OR, BIN_LOG_AND, BIN_LOG_OR, BIN_IP_ADD, BIN_IP_SUBTRACT,
BIN_IP_MULTIPLY, BIN_IP_DIVIDE, BIN_IP_MODULO, BIN_IP_POWER, BIN_IP_MULTIPLY, BIN_IP_DIVIDE, BIN_IP_MODULO, BIN_IP_POWER,
BIN_IP_LSHIFT, BIN_IP_RSHIFT, BIN_IP_AND, BIN_IP_XOR, BIN_IP_OR, BIN_IP_LSHIFT, BIN_IP_RSHIFT, BIN_IP_AND, BIN_IP_XOR, BIN_IP_OR,
BIN_IP_FLOOR, BIN_SUBSCR BIN_IP_FLOOR,
}; };
ASTBinary(PycRef<ASTNode> left, PycRef<ASTNode> right, int op, ASTBinary(PycRef<ASTNode> left, PycRef<ASTNode> right, int op,

View File

@@ -683,8 +683,6 @@ void print_src(PycRef<ASTNode> node, PycModule* mod, int indent)
print_ordered(node, bin->left(), mod, indent); print_ordered(node, bin->left(), mod, indent);
printf("%s", bin->op_str()); printf("%s", bin->op_str());
print_ordered(node, bin->right(), mod, indent); print_ordered(node, bin->right(), mod, indent);
if (bin->op() == ASTBinary::BIN_SUBSCR)
printf("]");
} }
break; break;
case ASTNode::NODE_UNARY: case ASTNode::NODE_UNARY: