MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / AppendAllTokens

Method AppendAllTokens

formatter/generic/genericformatter.cpp:147–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 size_t width;
146
147 void AppendAllTokens(vector<InstructionTextToken>& output, bool& firstTokenOfLine)
148 {
149 if (firstTokenOfLine)
150 {
151 if (!tokens.empty())
152 {
153 InstructionTextToken token = tokens.front();
154 string trimmedText = TrimLeadingWhitespace(token.text);
155 token.width -= token.text.size() - trimmedText.size();
156 token.text = trimmedText;
157 output.push_back(token);
158 output.insert(output.end(), tokens.begin() + 1, tokens.end());
159 firstTokenOfLine = false;
160 }
161 }
162 else
163 {
164 output.insert(output.end(), tokens.begin(), tokens.end());
165 }
166
167 for (auto& item : items)
168 item.AppendAllTokens(output, firstTokenOfLine);
169 }
170
171 void AddTokenToLastAtom(const InstructionTextToken& token)
172 {

Callers 1

FormatLinesMethod · 0.80

Calls 7

TrimLeadingWhitespaceFunction · 0.85
push_backMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected