MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / insertWithWhitespace

Function insertWithWhitespace

source/core/StarFormattedJson.cpp:221–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221void insertWithWhitespace(FormattedJson::ElementList& destination, WhitespaceStyle const& style,
222 FormattedJson::ElementLocation& at, JsonElement const& element) {
223 if (element.is<ValueElement>())
224 insertWhitespace(destination, at, style.beforeValue);
225 if (element.is<ObjectKeyElement>())
226 insertWhitespace(destination, at, style.beforeKey);
227 if (element.is<ColonElement>())
228 insertWhitespace(destination, at, style.beforeColon);
229 if (element.is<CommaElement>())
230 insertWhitespace(destination, at, style.beforeComma);
231 destination.insertAt(at++, element);
232}
233
234void insertWithCommaAndFormatting(FormattedJson::ElementList& destination, FormattedJson::ElementLocation at,
235 bool array, FormattedJson::ElementList const& elements) {

Callers 1

Calls 2

insertWhitespaceFunction · 0.85
insertAtMethod · 0.80

Tested by

no test coverage detected