| 1873 | */ |
| 1874 | |
| 1875 | static int |
| 1876 | yaml_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. |
no test coverage detected