1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-13 22:04:09 +02:00

Fixed null token crash while typing 'Program.this'

This commit is contained in:
Brian Fiete 2024-11-19 09:08:15 -05:00
parent b12b49aec3
commit f43da38dbb

View file

@ -8327,7 +8327,8 @@ BfObjectCreateExpression* BfReducer::CreateObjectCreateExpression(BfAstNode* all
if (objectCreateExpr->mCtorExplicit != NULL) if (objectCreateExpr->mCtorExplicit != NULL)
{ {
nextToken = BfNodeDynCast<BfTokenNode>(mVisitorPos.GetNext()); if (nextToken = BfNodeDynCast<BfTokenNode>(mVisitorPos.GetNext()))
{
if ((nextToken->mToken != NULL) && (nextToken->mToken == BfToken_LChevron)) if ((nextToken->mToken != NULL) && (nextToken->mToken == BfToken_LChevron))
{ {
mVisitorPos.MoveNext(); mVisitorPos.MoveNext();
@ -8338,6 +8339,7 @@ BfObjectCreateExpression* BfReducer::CreateObjectCreateExpression(BfAstNode* all
objectCreateExpr->mSrcEnd = objectCreateExpr->mCtorExplicit->mSrcEnd; objectCreateExpr->mSrcEnd = objectCreateExpr->mCtorExplicit->mSrcEnd;
} }
} }
}
// Note- if there WERE an LBracket here then we'd have an 'isArray' case. We pass this in here for // Note- if there WERE an LBracket here then we'd have an 'isArray' case. We pass this in here for
// error display purposes // error display purposes