Skip to content

Commit

Permalink
allow "&" instead of "out" in function pointer parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Oct 7, 2023
1 parent fdfcf48 commit c3a75e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/common/scripting/frontend/zcc-parse.lemon
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,14 @@ func_ptr_param(X) ::= func_param_flags(A) type(B).
X = parm;
}

func_ptr_param(X) ::= func_param_flags(A) AND type(B).
{
NEW_AST_NODE(FuncPtrParamDecl,parm,A.SourceLoc ? A.SourceLoc : B->SourceLoc);
parm->Type = B;
parm->Flags = A.Int | ZCC_Out;
X = parm;
}

aggregate_type(X) ::= CLASS(T) class_restrictor(A). /* class<type> */
{
NEW_AST_NODE(ClassType,cls,T);
Expand Down

0 comments on commit c3a75e9

Please sign in to comment.