From ea615df2007ea843e392d981348b3e468183e2dc Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 3 Sep 2010 21:56:29 -0700 Subject: [PATCH] Remove subscript binary op fragments since this had a dedicated node type --- ASTNode.cpp | 2 +- ASTNode.h | 2 +- ASTree.cpp | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ASTNode.cpp b/ASTNode.cpp index c3dbe5f..143df20 100644 --- a/ASTNode.cpp +++ b/ASTNode.cpp @@ -34,7 +34,7 @@ const char* ASTBinary::op_str() const ".", " ** ", " * ", " / ", " // ", " % ", " + ", " - ", " << ", " >> ", " & ", " ^ ", " | ", " and ", " or ", " += ", " -= ", " *= ", " /= ", " %= ", " **= ", " <<= ", - " >>= ", " &= ", " ^= ", " |= ", " //= ", "[" + " >>= ", " &= ", " ^= ", " |= ", " //= " }; return s_op_strings[op()]; } diff --git a/ASTNode.h b/ASTNode.h index 7280f4b..108d1b6 100644 --- a/ASTNode.h +++ b/ASTNode.h @@ -97,7 +97,7 @@ public: 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_LSHIFT, BIN_IP_RSHIFT, BIN_IP_AND, BIN_IP_XOR, BIN_IP_OR, - BIN_IP_FLOOR, BIN_SUBSCR + BIN_IP_FLOOR, }; ASTBinary(PycRef left, PycRef right, int op, diff --git a/ASTree.cpp b/ASTree.cpp index c0a476c..5c10726 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -683,8 +683,6 @@ void print_src(PycRef node, PycModule* mod, int indent) print_ordered(node, bin->left(), mod, indent); printf("%s", bin->op_str()); print_ordered(node, bin->right(), mod, indent); - if (bin->op() == ASTBinary::BIN_SUBSCR) - printf("]"); } break; case ASTNode::NODE_UNARY: