@@ -276,6 +276,7 @@ static vector<InstructionTextToken> ParseStringToken(
276
276
// Max parsing length set to max annotation length
277
277
if (tail > maxParsingLength)
278
278
return { unprocessedStringToken };
279
+
279
280
vector<InstructionTextToken> result;
280
281
size_t curStart = 0 , curEnd = 0 ;
281
282
@@ -939,13 +940,15 @@ vector<DisassemblyTextLine> GenericLineFormatter::FormatLines(
939
940
stack<ItemLayoutStackEntry> layoutStack;
940
941
layoutStack.push ({items, additionalContinuationIndentation, desiredWidth, desiredContinuationWidth, desiredStringWidth, false });
941
942
942
- auto newLine = [&]() {
943
+ auto newLine = [&](bool forString = false ) {
943
944
if (!firstTokenOfLine)
944
945
{
945
946
string lastTokenText = outputLine.tokens .back ().text ;
946
947
string trimmedText = TrimTrailingWhitespace (lastTokenText);
947
948
outputLine.tokens .back ().width -= lastTokenText.size () - trimmedText.size ();
948
949
outputLine.tokens .back ().text = trimmedText;
950
+ if (forString)
951
+ outputLine.tokens .emplace_back (BraceToken, " \" " );
949
952
}
950
953
951
954
result.push_back (outputLine);
@@ -960,6 +963,8 @@ vector<DisassemblyTextLine> GenericLineFormatter::FormatLines(
960
963
}
961
964
962
965
outputLine.tokens .emplace_back (TextToken, string (additionalContinuationIndentation, ' ' ));
966
+ if (forString)
967
+ outputLine.tokens .emplace_back (BraceToken, " \" " );
963
968
currentWidth = 0 ;
964
969
desiredWidth = desiredContinuationWidth;
965
970
firstTokenOfLine = true ;
@@ -987,8 +992,7 @@ vector<DisassemblyTextLine> GenericLineFormatter::FormatLines(
987
992
{
988
993
// If a string is too wide to fit on the current line, create a newline
989
994
// without additional indentation
990
- LogError (" Line length vs. desired %zu vs %zu" , currentWidth + item->width , desiredStringWidth);
991
- newLine ();
995
+ newLine (true );
992
996
continue ;
993
997
}
994
998
if (currentWidth + item->width > desiredWidth && item->type != StringWhitespace && item->type != StringComponent)
0 commit comments