py: Implement basic with support in native emitter.
diff --git a/py/compile.c b/py/compile.c
index aef59fb..ae91455 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -1624,6 +1624,11 @@
compile_node(comp, body);
} else {
uint l_end = comp_next_label(comp);
+ if (MICROPY_EMIT_NATIVE && comp->scope_cur->emit_options != MP_EMIT_OPT_BYTECODE) {
+ // we need to allocate an extra label for the native emitter
+ // it will use l_end+1 as an auxiliary label
+ comp_next_label(comp);
+ }
if (MP_PARSE_NODE_IS_STRUCT_KIND(nodes[0], PN_with_item)) {
// this pre-bit is of the form "a as b"
mp_parse_node_struct_t *pns = (mp_parse_node_struct_t*)nodes[0];