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

Function yaml_parser_fetch_directive

external/libyaml/src/scanner.c:1385–1415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1383 */
1384
1385static int
1386yaml_parser_fetch_directive(yaml_parser_t *parser)
1387{
1388 yaml_token_t token;
1389
1390 /* Reset the indentation level. */
1391
1392 if (!yaml_parser_unroll_indent(parser, -1))
1393 return 0;
1394
1395 /* Reset simple keys. */
1396
1397 if (!yaml_parser_remove_simple_key(parser))
1398 return 0;
1399
1400 parser->simple_key_allowed = 0;
1401
1402 /* Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. */
1403
1404 if (!yaml_parser_scan_directive(parser, &token))
1405 return 0;
1406
1407 /* Append the token to the queue. */
1408
1409 if (!ENQUEUE(parser, parser->tokens, token)) {
1410 yaml_token_delete(&token);
1411 return 0;
1412 }
1413
1414 return 1;
1415}
1416
1417/*
1418 * Produce the DOCUMENT-START or DOCUMENT-END token.

Callers 1

Calls 4

yaml_token_deleteFunction · 0.85

Tested by

no test coverage detected