1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

Fixed whitespace at the end

This commit is contained in:
Brian Fiete 2020-06-05 10:24:48 -07:00
parent e0588e83aa
commit 2eac63e31c

View file

@ -2791,11 +2791,10 @@ void BfPrinter::Visit(BfRootNode* rootNode)
// Flush whitespace at the end of the document // Flush whitespace at the end of the document
BfParserData* bfParser = rootNode->GetSourceData()->ToParserData(); BfParserData* bfParser = rootNode->GetSourceData()->ToParserData();
if (bfParser != NULL) if (bfParser != NULL)
{ {
BfAstNode endNode; BfAstNode* endNode = mSource->mAlloc.Alloc<BfAstNode>();
BfAstNode::Zero<BfAstNode>(&endNode); endNode->Init(rootNode->GetSrcEnd(), bfParser->mSrcLength, bfParser->mSrcLength);
endNode.Init(rootNode->GetSrcEnd(), rootNode->GetSrcEnd(), bfParser->mSrcLength - rootNode->GetSrcEnd()); Visit(endNode);
Visit(&endNode);
} }
if (mCharMapping != NULL) if (mCharMapping != NULL)