mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Merge pull request #2179 from Fusioon/Impl-2147
Add error on unpaired closing brace in string interpolation
This commit is contained in:
commit
432776c650
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue