Produce the ALIAS or ANCHOR token.
(parser *yaml_parser_t, typ yaml_token_type_t)
| 1438 | |
| 1439 | // Produce the ALIAS or ANCHOR token. |
| 1440 | func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { |
| 1441 | // An anchor or an alias could be a simple key. |
| 1442 | if !yaml_parser_save_simple_key(parser) { |
| 1443 | return false |
| 1444 | } |
| 1445 | |
| 1446 | // A simple key cannot follow an anchor or an alias. |
| 1447 | parser.simple_key_allowed = false |
| 1448 | |
| 1449 | // Create the ALIAS or ANCHOR token and append it to the queue. |
| 1450 | var token yaml_token_t |
| 1451 | if !yaml_parser_scan_anchor(parser, &token, typ) { |
| 1452 | return false |
| 1453 | } |
| 1454 | yaml_insert_token(parser, -1, &token) |
| 1455 | return true |
| 1456 | } |
| 1457 | |
| 1458 | // Produce the TAG token. |
| 1459 | func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { |
no test coverage detected