mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 12:02:21 +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,8 +1399,21 @@ void BfPrinter::Visit(BfIdentifierNode* identifierNode)
|
||||||
Visit(identifierNode->ToBase());
|
Visit(identifierNode->ToBase());
|
||||||
|
|
||||||
if (!CheckReplace(identifierNode))
|
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);
|
WriteSourceString(identifierNode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void BfPrinter::Visit(BfQualifiedNameNode* nameNode)
|
void BfPrinter::Visit(BfQualifiedNameNode* nameNode)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue