Skip to content
Snippets Groups Projects
Commit 216a711c authored by Damien George's avatar Damien George
Browse files

py/compile: Fix typo when checking for parse-node kind.

parent 6cf2a396
Branches
No related tags found
No related merge requests found
...@@ -499,8 +499,7 @@ STATIC void c_assign(compiler_t *comp, mp_parse_node_t pn, assign_kind_t assign_ ...@@ -499,8 +499,7 @@ STATIC void c_assign(compiler_t *comp, mp_parse_node_t pn, assign_kind_t assign_
// sequence of many items // sequence of many items
uint n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns2); uint n = MP_PARSE_NODE_STRUCT_NUM_NODES(pns2);
c_assign_tuple(comp, pns->nodes[0], n, pns2->nodes); c_assign_tuple(comp, pns->nodes[0], n, pns2->nodes);
} else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) { } else if (MP_PARSE_NODE_STRUCT_KIND(pns2) == PN_comp_for) {
// TODO can we ever get here? can it be compiled?
goto cannot_assign; goto cannot_assign;
} else { } else {
// sequence with 2 items // sequence with 2 items
...@@ -900,8 +899,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) { ...@@ -900,8 +899,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) {
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
c_del_stmt(comp, pns1->nodes[i]); c_del_stmt(comp, pns1->nodes[i]);
} }
} else if (MP_PARSE_NODE_STRUCT_KIND(pns) == PN_comp_for) { } else if (MP_PARSE_NODE_STRUCT_KIND(pns1) == PN_comp_for) {
// TODO not implemented; can't del comprehension? can we get here?
goto cannot_delete; goto cannot_delete;
} else { } else {
// sequence with 2 items // sequence with 2 items
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment