MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / yaml_parser_unroll_indent

Function yaml_parser_unroll_indent

external/libyaml/src/scanner.c:1276–1303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1274
1275
1276static int
1277yaml_parser_unroll_indent(yaml_parser_t *parser, ptrdiff_t column)
1278{
1279 yaml_token_t token;
1280
1281 /* In the flow context, do nothing. */
1282
1283 if (parser->flow_level)
1284 return 1;
1285
1286 /* Loop through the indentation levels in the stack. */
1287
1288 while (parser->indent > column)
1289 {
1290 /* Create a token and append it to the queue. */
1291
1292 TOKEN_INIT(token, YAML_BLOCK_END_TOKEN, parser->mark, parser->mark);
1293
1294 if (!ENQUEUE(parser, parser->tokens, token))
1295 return 0;
1296
1297 /* Pop the indentation level. */
1298
1299 parser->indent = POP(parser, parser->indents);
1300 }
1301
1302 return 1;
1303}
1304
1305/*
1306 * Initialize the scanner and produce the STREAM-START token.

Calls

no outgoing calls

Tested by

no test coverage detected