Skip to content

Commit 216a711

Browse files
committed
py/compile: Fix typo when checking for parse-node kind.
1 parent 6cf2a39 commit 216a711

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

py/compile.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,7 @@ STATIC void c_assign(compiler_t *comp, mp_parse_node_t pn, assign_kind_t assign_
499499
// sequence of many items
500500
uint n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns2);
501501
c_assign_tuple(comp, pns->nodes[0], n, pns2->nodes);
502-
} else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) {
503-
// TODO can we ever get here? can it be compiled?
502+
} else if (MP_PARSE_NODE_STRUCT_KIND(pns2) == PN_comp_for) {
504503
goto cannot_assign;
505504
} else {
506505
// sequence with 2 items
@@ -900,8 +899,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) {
900899
for (int i = 0; i < n; i++) {
901900
c_del_stmt(comp, pns1->nodes[i]);
902901
}
903-
} else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) {
904-
// TODO not implemented; can't del comprehension? can we get here?
902+
} else if (MP_PARSE_NODE_STRUCT_KIND(pns1) == PN_comp_for) {
905903
goto cannot_delete;
906904
} else {
907905
// sequence with 2 items

0 commit comments

Comments
 (0)