From bd7ef7a572f3faa58a550baca46a1b4f95e9b95d Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 24 Jan 2018 22:54:19 +0100 Subject: Allow empty code blocks --- c.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c.y b/c.y index 96866ef..fcf4e1f 100644 --- a/c.y +++ b/c.y @@ -115,7 +115,10 @@ parameter: type ID { $$->name = $2; } ; -block: '{' statement_list '}' { +block: '{' '}' { + $$ = node_make_1(N_BLOCK, node_make_0(N_LIST_END)); + } + | '{' statement_list '}' { $$ = node_make_1(N_BLOCK, $2); } ; -- cgit v1.2.3-70-g09d2