MCPcopy
hub / github.com/Exrick/xpay / composeNode

Function composeNode

xpay-code/src/main/resources/static/swagger/swagger-ui.js:12319–12473  ·  view source on GitHub ↗
(state, parentIndent, nodeContext, allowToSeek, allowCompact)

Source from the content-addressed store, hash-verified

12317}
12318
12319function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
12320 var allowBlockStyles,
12321 allowBlockScalars,
12322 allowBlockCollections,
12323 indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent
12324 atNewLine = false,
12325 hasContent = false,
12326 typeIndex,
12327 typeQuantity,
12328 type,
12329 flowIndent,
12330 blockIndent;
12331
12332 if (state.listener !== null) {
12333 state.listener('open', state);
12334 }
12335
12336 state.tag = null;
12337 state.anchor = null;
12338 state.kind = null;
12339 state.result = null;
12340
12341 allowBlockStyles = allowBlockScalars = allowBlockCollections =
12342 CONTEXT_BLOCK_OUT === nodeContext ||
12343 CONTEXT_BLOCK_IN === nodeContext;
12344
12345 if (allowToSeek) {
12346 if (skipSeparationSpace(state, true, -1)) {
12347 atNewLine = true;
12348
12349 if (state.lineIndent > parentIndent) {
12350 indentStatus = 1;
12351 } else if (state.lineIndent === parentIndent) {
12352 indentStatus = 0;
12353 } else if (state.lineIndent < parentIndent) {
12354 indentStatus = -1;
12355 }
12356 }
12357 }
12358
12359 if (indentStatus === 1) {
12360 while (readTagProperty(state) || readAnchorProperty(state)) {
12361 if (skipSeparationSpace(state, true, -1)) {
12362 atNewLine = true;
12363 allowBlockCollections = allowBlockStyles;
12364
12365 if (state.lineIndent > parentIndent) {
12366 indentStatus = 1;
12367 } else if (state.lineIndent === parentIndent) {
12368 indentStatus = 0;
12369 } else if (state.lineIndent < parentIndent) {
12370 indentStatus = -1;
12371 }
12372 } else {
12373 allowBlockCollections = false;
12374 }
12375 }
12376 }

Callers 4

readFlowCollectionFunction · 0.85
readBlockSequenceFunction · 0.85
readBlockMappingFunction · 0.85
readDocumentFunction · 0.85

Calls 12

skipSeparationSpaceFunction · 0.85
readTagPropertyFunction · 0.85
readAnchorPropertyFunction · 0.85
readBlockSequenceFunction · 0.85
readBlockMappingFunction · 0.85
readFlowCollectionFunction · 0.85
readBlockScalarFunction · 0.85
readSingleQuotedScalarFunction · 0.85
readDoubleQuotedScalarFunction · 0.85
readAliasFunction · 0.85
throwErrorFunction · 0.85
readPlainScalarFunction · 0.85

Tested by

no test coverage detected