From c8148e05608d02ebc603773ad1a8e2a7f55f33ff Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 22 Feb 2016 13:49:09 -0500 Subject: eshtrans/frontend: Inject function start/end tokens --- (limited to 'eshtrans/frontend') 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 -- cgit v0.9.1