| 219 | } |
| 220 | |
| 221 | void 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 | |
| 234 | void insertWithCommaAndFormatting(FormattedJson::ElementList& destination, FormattedJson::ElementLocation at, |
| 235 | bool array, FormattedJson::ElementList const& elements) { |
no test coverage detected