summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-23 02:10:46 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-23 02:10:46 (EST)
commit9f7b248ef91b002b6a43429049fc41401af8bb2a (patch)
treefc6e99622a0991c52eea1a9a8b525045152eea2f /eshtrans
parent14d9076de5c998cfa64c9bc15d9816323174733b (diff)
downloadeggshell-9f7b248ef91b002b6a43429049fc41401af8bb2a.zip
eggshell-9f7b248ef91b002b6a43429049fc41401af8bb2a.tar.gz
eggshell-9f7b248ef91b002b6a43429049fc41401af8bb2a.tar.bz2
eshtrans/frontend: Accept any compound command in function body
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/frontend/parser.esh11
1 files changed, 4 insertions, 7 deletions
diff --git a/eshtrans/frontend/parser.esh b/eshtrans/frontend/parser.esh
index e967fc7..d18abee 100644
--- a/eshtrans/frontend/parser.esh
+++ b/eshtrans/frontend/parser.esh
@@ -364,14 +364,11 @@ until_clause()
function_body()
{
ptrace_begn function_body
- if accept T_LBRACE; then
- inject T_FN_START
- if ! compound_list; then
- ptrace_fail function_body
- return 1
- fi
+ inject T_LBRACE
+ inject T_FN_START
+ if compound_command; then
inject T_FN_END
- expect T_RBRACE
+ inject T_RBRACE
ptrace_pass function_body
return 0
fi