summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/backend/codegen.esh5
-rw-r--r--eshtrans/backend/main.esh5
2 files changed, 7 insertions, 3 deletions
diff --git a/eshtrans/backend/codegen.esh b/eshtrans/backend/codegen.esh
index 6dc3d64..6f52c80 100644
--- a/eshtrans/backend/codegen.esh
+++ b/eshtrans/backend/codegen.esh
@@ -202,3 +202,8 @@ sh_start_tu()
printf '__%s_static_fns=\n' "${tu_id}"
static_fn_n=0
}
+
+sh_end_tu()
+{
+ printf '__tu_end\n'
+}
diff --git a/eshtrans/backend/main.esh b/eshtrans/backend/main.esh
index 8851053..60bc622 100644
--- a/eshtrans/backend/main.esh
+++ b/eshtrans/backend/main.esh
@@ -25,9 +25,8 @@ sh_codegen()
sh_set_tu_id "${toks}"
sh_start_tu
- if printf '%s' "${toks}" | sh_parse_stack; then
- return 0
- else
+ if ! printf '%s' "${toks}" | sh_parse_stack; then
return 1
fi
+ sh_end_tu
}