mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Kludge to fix spacing in formatting of failed parses
This commit is contained in:
parent
91ec99e1ba
commit
c5098cb28b
1 changed files with 13 additions and 0 deletions
|
@ -1399,7 +1399,20 @@ void BfPrinter::Visit(BfIdentifierNode* identifierNode)
|
|||
Visit(identifierNode->ToBase());
|
||||
|
||||
if (!CheckReplace(identifierNode))
|
||||
{
|
||||
if (!mOutString.IsEmpty())
|
||||
{
|
||||
char endC = mOutString[mOutString.mLength - 1];
|
||||
if ((endC == '_') || (isalnum((uint8)endC)))
|
||||
{
|
||||
// Can fix spacing in error conditions
|
||||
if (identifierNode->mTriviaStart >= 0)
|
||||
Write(identifierNode, identifierNode->mTriviaStart, identifierNode->mSrcStart - identifierNode->mTriviaStart);
|
||||
}
|
||||
}
|
||||
|
||||
WriteSourceString(identifierNode);
|
||||
}
|
||||
}
|
||||
|
||||
void BfPrinter::Visit(BfQualifiedNameNode* nameNode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue