1 parent db4e009 commit deaa57aCopy full SHA for deaa57a
1 file changed
py/compile.c
@@ -2723,15 +2723,8 @@ STATIC void compile_node(compiler_t *comp, mp_parse_node_t pn) {
2723
mp_parse_node_struct_t *pns = (mp_parse_node_struct_t*)pn;
2724
EMIT_ARG(set_source_line, pns->source_line);
2725
compile_function_t f = compile_function[MP_PARSE_NODE_STRUCT_KIND(pns)];
2726
- if (f == NULL) {
2727
-#if MICROPY_DEBUG_PRINTERS
2728
- printf("node %u cannot be compiled\n", (uint)MP_PARSE_NODE_STRUCT_KIND(pns));
2729
- mp_parse_node_print(pn, 0);
2730
-#endif
2731
- compile_syntax_error(comp, pn, "internal compiler error");
2732
- } else {
2733
- f(comp, pns);
2734
- }
+ assert(f != NULL);
+ f(comp, pns);
2735
}
2736
2737
0 commit comments