Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens.
(parser *yaml_parser_t, single bool)
| 1495 | |
| 1496 | // Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. |
| 1497 | func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { |
| 1498 | // A plain scalar could be a simple key. |
| 1499 | if !yaml_parser_save_simple_key(parser) { |
| 1500 | return false |
| 1501 | } |
| 1502 | |
| 1503 | // A simple key cannot follow a flow scalar. |
| 1504 | parser.simple_key_allowed = false |
| 1505 | |
| 1506 | // Create the SCALAR token and append it to the queue. |
| 1507 | var token yaml_token_t |
| 1508 | if !yaml_parser_scan_flow_scalar(parser, &token, single) { |
| 1509 | return false |
| 1510 | } |
| 1511 | yaml_insert_token(parser, -1, &token) |
| 1512 | return true |
| 1513 | } |
| 1514 | |
| 1515 | // Produce the SCALAR(...,plain) token. |
| 1516 | func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { |
no test coverage detected