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

Better handling of autocomplete with tokens

This commit is contained in:
Brian Fiete 2020-05-26 06:10:51 -07:00
parent 74f3ef4e43
commit e16e4613b6
14 changed files with 108 additions and 65 deletions

View file

@ -2787,9 +2787,15 @@ void BfPrinter::Visit(BfRootNode* rootNode)
child->Accept(this);
}
// Flush whitespace at the end of the document
BfParserData* bfParser = rootNode->GetSourceData()->ToParserData();
if (bfParser != NULL)
Write(rootNode, rootNode->GetSrcEnd(), bfParser->mSrcLength - rootNode->GetSrcEnd());
{
BfAstNode endNode;
BfAstNode::Zero<BfAstNode>(&endNode);
endNode.Init(rootNode->GetSrcEnd(), rootNode->GetSrcEnd(), bfParser->mSrcLength - rootNode->GetSrcEnd());
Visit(&endNode);
}
if (mCharMapping != NULL)
{