MCPcopy
hub / github.com/IvanMathy/Boop / readLineBreak

Function readLineBreak

Boop/Boop/scripts/lib/js-yaml.js:1346–1364  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

1344}
1345
1346function readLineBreak(state) {
1347 var ch;
1348
1349 ch = state.input.charCodeAt(state.position);
1350
1351 if (ch === 0x0A/* LF */) {
1352 state.position++;
1353 } else if (ch === 0x0D/* CR */) {
1354 state.position++;
1355 if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
1356 state.position++;
1357 }
1358 } else {
1359 throwError(state, 'a line break is expected');
1360 }
1361
1362 state.line += 1;
1363 state.lineStart = state.position;
1364}
1365
1366function skipSeparationSpace(state, allowComments, checkIndent) {
1367 var lineBreaks = 0,

Callers 3

skipSeparationSpaceFunction · 0.85
readBlockScalarFunction · 0.85
readDocumentFunction · 0.85

Calls 1

throwErrorFunction · 0.85

Tested by

no test coverage detected