From 0bb79bed297455a05c8ff64a1473bacd00bc2bfd Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 23 Feb 2016 02:28:21 -0500 Subject: eshtrans/backend: Add __tu_end() call --- 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 } -- cgit v0.9.1