summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/frontend/parser.esh10
1 files changed, 8 insertions, 2 deletions
diff --git a/eshtrans/frontend/parser.esh b/eshtrans/frontend/parser.esh
index a29bc5c..eb82666 100644
--- a/eshtrans/frontend/parser.esh
+++ b/eshtrans/frontend/parser.esh
@@ -364,8 +364,14 @@ until_clause()
function_body()
{
ptrace_begn function_body
- if compound_command; then
- redirect_list
+ if accept T_LBRACE; then
+ inject T_FN_START
+ if ! compound_list; then
+ ptrace_fail function_body
+ return 1
+ fi
+ inject T_FN_END
+ expect T_RBRACE
ptrace_pass function_body
return 0
fi