Skip to content

Commit 195e18d

Browse files
committed
fix parsing of struct return values
1 parent 24b88ed commit 195e18d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

frontends/spin/spin.y

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,13 @@ paramidentdecl:
16201620
LANGUAGE_WARNING(LANG_ANY, $1, "default parameter values are a flexspin extension");
16211621
$$ = AstAssign($1, $3);
16221622
}
1623+
| general_type identifier
1624+
{
1625+
AST *typ = $1;
1626+
AST *ident = $2;
1627+
1628+
$$ = NewAST(AST_DECLARE_VAR, typ, ident);
1629+
}
16231630
| '^' general_type identifier
16241631
{
16251632
AST *typ = $2;

0 commit comments

Comments
 (0)