summaryrefslogtreecommitdiff
path: root/py/compile.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-09-30 14:48:06 +1000
committerDamien George <damien.p.george@gmail.com>2016-09-30 14:48:06 +1000
commit216a711cd4a4b307190db51e36eac2aad2f524d2 (patch)
tree3eedabb9030e67b2dea14243cb47fd6981fdd32e /py/compile.c
parent6cf2a3966e12af5f86781a5d20c0810953722811 (diff)
py/compile: Fix typo when checking for parse-node kind.
Diffstat (limited to 'py/compile.c')
-rw-r--r--py/compile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/py/compile.c b/py/compile.c
index 1d371cb33..0ea8a3c15 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -499,8 +499,7 @@ STATIC void c_assign(compiler_t *comp, mp_parse_node_t pn, assign_kind_t assign_
// sequence of many items
uint n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns2);
c_assign_tuple(comp, pns->nodes[0], n, pns2->nodes);
- } else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) {
- // TODO can we ever get here? can it be compiled?
+ } else if (MP_PARSE_NODE_STRUCT_KIND(pns2) == PN_comp_for) {
goto cannot_assign;
} else {
// sequence with 2 items
@@ -900,8 +899,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) {
for (int i = 0; i < n; i++) {
c_del_stmt(comp, pns1->nodes[i]);
}
- } else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) {
- // TODO not implemented; can't del comprehension? can we get here?
+ } else if (MP_PARSE_NODE_STRUCT_KIND(pns1) == PN_comp_for) {
goto cannot_delete;
} else {
// sequence with 2 items