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

Function yaml_parser_fetch_flow_scalar

external/libyaml/src/scanner.c:1875–1900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1873 */
1874
1875static int
1876yaml_parser_fetch_flow_scalar(yaml_parser_t *parser, int single)
1877{
1878 yaml_token_t token;
1879
1880 /* A plain scalar could be a simple key. */
1881
1882 if (!yaml_parser_save_simple_key(parser))
1883 return 0;
1884
1885 /* A simple key cannot follow a flow scalar. */
1886
1887 parser->simple_key_allowed = 0;
1888
1889 /* Create the SCALAR token and append it to the queue. */
1890
1891 if (!yaml_parser_scan_flow_scalar(parser, &token, single))
1892 return 0;
1893
1894 if (!ENQUEUE(parser, parser->tokens, token)) {
1895 yaml_token_delete(&token);
1896 return 0;
1897 }
1898
1899 return 1;
1900}
1901
1902/*
1903 * Produce the SCALAR(...,plain) token.

Callers 1

Calls 3

yaml_token_deleteFunction · 0.85

Tested by

no test coverage detected