changed to left recursion so that the marshalled json uses the same member order as the struct

This commit is contained in:
overflowerror 2021-05-04 12:14:33 +02:00
parent a21ec9553f
commit 7c433f61b5

View file

@ -63,10 +63,10 @@ declars: /* empty */
{
$$ = newDeclarsInfo();
}
| declar SEMICOLON declars
| declars declar SEMICOLON
{
$$ = $3;
addStruct($3, $1);
$$ = $1;
addStruct($$, $2);
}
;
@ -104,10 +104,10 @@ structmembers: /* empty */
{
$$ = newStructInfo();
}
| structmember SEMICOLON structmembers
| structmembers structmember SEMICOLON
{
$$ = $3;
addMember($$, $1);
$$ = $1;
addMember($$, $2);
}
;