1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fix for lambda parsing

This commit is contained in:
Brian Fiete 2020-09-12 06:37:22 -07:00
parent c04778ec5a
commit aaf3eb86f6

View file

@ -1984,8 +1984,11 @@ BfExpression* BfReducer::CreateExpression(BfAstNode* node, CreateExprFlags creat
isLambda = true;
if (auto innerToken = BfNodeDynCast<BfTokenNode>(mVisitorPos.GetNext()))
{
// Specifically we're looking for a (function ...) cast, but any token here means it's not a lambda
isLambda = false;
if (innerToken->mToken != BfToken_RParen)
{
// Specifically we're looking for a (function ...) cast, but any token besides a close here means it's not a lambda
isLambda = false;
}
}
}
if (isLambda)