]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani.mdc
oceani-tests: add tests with lots of blank lines.
[ocean] / csrc / oceani.mdc
index d3a4caf519c4f62a38a2b59123ebab5b52556487..d234968144dc1b245dbd95cc12a0e60a283e40e5 100644 (file)
@@ -2031,14 +2031,17 @@ function will be needed.
                | Open SimpleFieldList } ${ $0 = $<2; }$
                | : FieldList $$NEWLINE ${ $0 = $<2; }$
 
-       FieldList -> SimpleFieldListLine ${ $0 = $<1; }$
-               | FieldList SimpleFieldListLine ${
+       FieldList -> FieldLines ${ $0 = $<1; }$
+               | NEWLINE FieldLines ${ $0 = $<2; }$
+       FieldLines -> SimpleFieldListLine ${ $0 = $<1; }$
+               | FieldLines SimpleFieldListLine ${
                        $2->prev = $<1;
                        $0 = $<2;
                }$
 
        SimpleFieldListLine -> SimpleFieldList NEWLINE ${ $0 = $<1; }$
                | SimpleFieldListLine NEWLINE ${ $0 = $<1; }$
+               | ERROR NEWLINE ${ tok_err(c, "Syntax error in struct field", &$1); }$
 
        SimpleFieldList -> Field ${ $0 = $<1; }$
                | SimpleFieldList ; Field ${
@@ -2071,7 +2074,6 @@ function will be needed.
                        $0->f.type = $<3;
                        $0->f.init = val_init($3);
                }$
-               | ERROR ${ tok_err(c, "Syntax error in struct field", &$1); }$
 
 ###### forward decls
        static void structure_print_type(struct type *t, FILE *f);