mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed autoCtor parsing issue when followed by type generic constraint
This commit is contained in:
parent
0734c9ffbb
commit
9d72043a71
1 changed files with 4 additions and 5 deletions
|
@ -9887,6 +9887,10 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
|
||||||
MoveNode(methodDeclaration->mCloseParen, methodDeclaration);
|
MoveNode(methodDeclaration->mCloseParen, methodDeclaration);
|
||||||
mVisitorPos.MoveNext();
|
mVisitorPos.MoveNext();
|
||||||
|
|
||||||
|
auto ctorDecl = BfNodeDynCast<BfConstructorDeclaration>(methodDeclaration);
|
||||||
|
if (auto autoCtorDecl = BfNodeDynCast<BfAutoConstructorDeclaration>(ctorDecl))
|
||||||
|
return true;
|
||||||
|
|
||||||
auto typeDecl = mCurTypeDecl;
|
auto typeDecl = mCurTypeDecl;
|
||||||
nextNode = mVisitorPos.GetNext();
|
nextNode = mVisitorPos.GetNext();
|
||||||
if ((tokenNode = BfNodeDynCast<BfTokenNode>(nextNode)))
|
if ((tokenNode = BfNodeDynCast<BfTokenNode>(nextNode)))
|
||||||
|
@ -9914,8 +9918,6 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto ctorDecl = BfNodeDynCast<BfConstructorDeclaration>(methodDeclaration);
|
|
||||||
|
|
||||||
nextNode = mVisitorPos.GetNext();
|
nextNode = mVisitorPos.GetNext();
|
||||||
auto endToken = BfNodeDynCast<BfTokenNode>(nextNode);
|
auto endToken = BfNodeDynCast<BfTokenNode>(nextNode);
|
||||||
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Colon))
|
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Colon))
|
||||||
|
@ -9974,9 +9976,6 @@ bool BfReducer::ParseMethod(BfMethodDeclaration* methodDeclaration, SizedArrayIm
|
||||||
endToken = NULL;
|
endToken = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto autoCtorDecl = BfNodeDynCast<BfAutoConstructorDeclaration>(ctorDecl))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Semicolon))
|
if ((endToken != NULL) && (endToken->GetToken() == BfToken_Semicolon))
|
||||||
{
|
{
|
||||||
MEMBER_SET_CHECKED_BOOL(methodDeclaration, mEndSemicolon, endToken);
|
MEMBER_SET_CHECKED_BOOL(methodDeclaration, mEndSemicolon, endToken);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue