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

Function yaml_parser_fetch_flow_collection_start

external/libyaml/src/scanner.c:1466–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1464 */
1465
1466static int
1467yaml_parser_fetch_flow_collection_start(yaml_parser_t *parser,
1468 yaml_token_type_t type)
1469{
1470 yaml_mark_t start_mark, end_mark;
1471 yaml_token_t token;
1472
1473 /* The indicators '[' and '{' may start a simple key. */
1474
1475 if (!yaml_parser_save_simple_key(parser))
1476 return 0;
1477
1478 /* Increase the flow level. */
1479
1480 if (!yaml_parser_increase_flow_level(parser))
1481 return 0;
1482
1483 /* A simple key may follow the indicators '[' and '{'. */
1484
1485 parser->simple_key_allowed = 1;
1486
1487 /* Consume the token. */
1488
1489 start_mark = parser->mark;
1490 SKIP(parser);
1491 end_mark = parser->mark;
1492
1493 /* Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. */
1494
1495 TOKEN_INIT(token, type, start_mark, end_mark);
1496
1497 /* Append the token to the queue. */
1498
1499 if (!ENQUEUE(parser, parser->tokens, token))
1500 return 0;
1501
1502 return 1;
1503}
1504
1505/*
1506 * Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.

Callers 1

Calls 2

Tested by

no test coverage detected