From f393f23988d53a2ae8a12043b3981ce8030c4f1e Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sun, 16 Jun 2019 11:37:03 +1000 Subject: [PATCH] oceani: re-indent DeclareStruct It wasn't indented to easily allow alternate productions. Signed-off-by: NeilBrown --- csrc/oceani.mdc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index af7768d..4f00438 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -2001,24 +2001,24 @@ function will be needed. ###### top level grammar DeclareStruct -> struct IDENTIFIER FieldBlock ${ { - struct type *t = - add_type(c, $2.txt, &structure_prototype); - int cnt = 0; - struct fieldlist *f; - - for (f = $3; f; f=f->prev) - cnt += 1; - - t->structure.nfields = cnt; - t->structure.fields = calloc(cnt, sizeof(struct field)); - f = $3; - while (cnt > 0) { - cnt -= 1; - t->structure.fields[cnt] = f->f; - f->f.init = val_prepare(Tnone); - f = f->prev; - } - } }$ + struct type *t = + add_type(c, $2.txt, &structure_prototype); + int cnt = 0; + struct fieldlist *f; + + for (f = $3; f; f=f->prev) + cnt += 1; + + t->structure.nfields = cnt; + t->structure.fields = calloc(cnt, sizeof(struct field)); + f = $3; + while (cnt > 0) { + cnt -= 1; + t->structure.fields[cnt] = f->f; + f->f.init = val_prepare(Tnone); + f = f->prev; + } + } }$ $void Open -> { -- 2.43.0