1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Error on unpaired end brace in string interpolation

This commit is contained in:
Fusioon 2025-03-07 23:19:35 +01:00
parent 805d312c98
commit 2a879940c3

View file

@ -2323,6 +2323,11 @@ void BfParser::NextToken(int endIdx, bool outerIsInterpolate, bool disablePrepro
{
for (int i = 0; i < braceCount - 1; i++)
strLiteral += '}';
if ((((isClosingBrace) && (braceCount > 1) && (braceCount % 2 == 0)) || ((!isClosingBrace)) && (braceCount % 2 == 1)))
{
mPassInstance->FailAt("Unpaired closing brace.", mSourceData, mSrcIdx - 1, 1);
}
}
else
{