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

Function yaml_parser_fetch_block_scalar

external/libyaml/src/scanner.c:1844–1869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1842 */
1843
1844static int
1845yaml_parser_fetch_block_scalar(yaml_parser_t *parser, int literal)
1846{
1847 yaml_token_t token;
1848
1849 /* Remove any potential simple keys. */
1850
1851 if (!yaml_parser_remove_simple_key(parser))
1852 return 0;
1853
1854 /* A simple key may follow a block scalar. */
1855
1856 parser->simple_key_allowed = 1;
1857
1858 /* Create the SCALAR token and append it to the queue. */
1859
1860 if (!yaml_parser_scan_block_scalar(parser, &token, literal))
1861 return 0;
1862
1863 if (!ENQUEUE(parser, parser->tokens, token)) {
1864 yaml_token_delete(&token);
1865 return 0;
1866 }
1867
1868 return 1;
1869}
1870
1871/*
1872 * Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens.

Callers 1

Calls 3

yaml_token_deleteFunction · 0.85

Tested by

no test coverage detected