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

Function yaml_parser_fetch_anchor

external/libyaml/src/scanner.c:1783–1807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1781 */
1782
1783static int
1784yaml_parser_fetch_anchor(yaml_parser_t *parser, yaml_token_type_t type)
1785{
1786 yaml_token_t token;
1787
1788 /* An anchor or an alias could be a simple key. */
1789
1790 if (!yaml_parser_save_simple_key(parser))
1791 return 0;
1792
1793 /* A simple key cannot follow an anchor or an alias. */
1794
1795 parser->simple_key_allowed = 0;
1796
1797 /* Create the ALIAS or ANCHOR token and append it to the queue. */
1798
1799 if (!yaml_parser_scan_anchor(parser, &token, type))
1800 return 0;
1801
1802 if (!ENQUEUE(parser, parser->tokens, token)) {
1803 yaml_token_delete(&token);
1804 return 0;
1805 }
1806 return 1;
1807}
1808
1809/*
1810 * Produce the TAG token.

Callers 1

Calls 3

yaml_parser_scan_anchorFunction · 0.85
yaml_token_deleteFunction · 0.85

Tested by

no test coverage detected