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

Function yaml_parser_fetch_flow_collection_end

external/libyaml/src/scanner.c:1509–1546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507 */
1508
1509static int
1510yaml_parser_fetch_flow_collection_end(yaml_parser_t *parser,
1511 yaml_token_type_t type)
1512{
1513 yaml_mark_t start_mark, end_mark;
1514 yaml_token_t token;
1515
1516 /* Reset any potential simple key on the current flow level. */
1517
1518 if (!yaml_parser_remove_simple_key(parser))
1519 return 0;
1520
1521 /* Decrease the flow level. */
1522
1523 if (!yaml_parser_decrease_flow_level(parser))
1524 return 0;
1525
1526 /* No simple keys after the indicators ']' and '}'. */
1527
1528 parser->simple_key_allowed = 0;
1529
1530 /* Consume the token. */
1531
1532 start_mark = parser->mark;
1533 SKIP(parser);
1534 end_mark = parser->mark;
1535
1536 /* Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. */
1537
1538 TOKEN_INIT(token, type, start_mark, end_mark);
1539
1540 /* Append the token to the queue. */
1541
1542 if (!ENQUEUE(parser, parser->tokens, token))
1543 return 0;
1544
1545 return 1;
1546}
1547
1548/*
1549 * Produce the FLOW-ENTRY token.

Callers 1

Tested by

no test coverage detected