ref: 439fd8a6d2e636acabe21de2b9223d1030adc8b0
parent: 696f09d26baafa1b2369c2b20784d5ad2f73dcc7
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Aug 15 16:14:25 EDT 2012
Fixed bug in compound function Once that parser arrive to the function compound MUST be a '{' and not CAN be a one. So we have to change accept call to expect call.
--- a/flow.c
+++ b/flow.c
@@ -122,12 +122,11 @@
void
compound(void)
{
- if (accept('{')) {
- new_ctx();
- while (decl())
- /* nothing */;
- while (!accept('}'))
- stmt();
- del_ctx();
- }
+ expect('{');
+ new_ctx();
+ while (decl())
+ /* nothing */;
+ while (!accept('}'))
+ stmt();
+ del_ctx();
}
--
⑨