1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Fixed method param attribute parsing with no type specified

This commit is contained in:
Brian Fiete 2021-11-27 11:38:16 -08:00
parent 244407c7fe
commit 1b26619087
2 changed files with 12 additions and 1 deletions

View file

@ -9103,6 +9103,16 @@ BfTokenNode* BfReducer::ParseMethodParams(BfAstNode* node, SizedArrayImpl<BfPara
{
if ((token != BfToken_In) && (token != BfToken_Out) && (token != BfToken_Ref) && (token != BfToken_Mut) && (token != BfToken_Params) && (token != BfToken_ReadOnly))
{
if (attributes != NULL)
{
auto paramDecl = mAlloc->Alloc<BfParameterDeclaration>();
ReplaceNode(attributes, paramDecl);
MoveNode(paramDecl, node);
params->push_back(paramDecl);
MEMBER_SET(paramDecl, mAttributes, attributes);
attributes = NULL;
}
Fail("Invalid token", tokenNode);
return NULL;
}