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

Function readBlockSequence

xpay-code/src/main/resources/static/swagger/swagger-ui.js:11953–12013  ·  view source on GitHub ↗
(state, nodeIndent)

Source from the content-addressed store, hash-verified

11951}
11952
11953function readBlockSequence(state, nodeIndent) {
11954 var _line,
11955 _tag = state.tag,
11956 _anchor = state.anchor,
11957 _result = [],
11958 following,
11959 detected = false,
11960 ch;
11961
11962 if (state.anchor !== null) {
11963 state.anchorMap[state.anchor] = _result;
11964 }
11965
11966 ch = state.input.charCodeAt(state.position);
11967
11968 while (ch !== 0) {
11969
11970 if (ch !== 0x2D/* - */) {
11971 break;
11972 }
11973
11974 following = state.input.charCodeAt(state.position + 1);
11975
11976 if (!is_WS_OR_EOL(following)) {
11977 break;
11978 }
11979
11980 detected = true;
11981 state.position++;
11982
11983 if (skipSeparationSpace(state, true, -1)) {
11984 if (state.lineIndent <= nodeIndent) {
11985 _result.push(null);
11986 ch = state.input.charCodeAt(state.position);
11987 continue;
11988 }
11989 }
11990
11991 _line = state.line;
11992 composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
11993 _result.push(state.result);
11994 skipSeparationSpace(state, true, -1);
11995
11996 ch = state.input.charCodeAt(state.position);
11997
11998 if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
11999 throwError(state, 'bad indentation of a sequence entry');
12000 } else if (state.lineIndent < nodeIndent) {
12001 break;
12002 }
12003 }
12004
12005 if (detected) {
12006 state.tag = _tag;
12007 state.anchor = _anchor;
12008 state.kind = 'sequence';
12009 state.result = _result;
12010 return true;

Callers 1

composeNodeFunction · 0.85

Calls 4

is_WS_OR_EOLFunction · 0.85
skipSeparationSpaceFunction · 0.85
composeNodeFunction · 0.85
throwErrorFunction · 0.85

Tested by

no test coverage detected