Parse the productions: flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? * ***** *
(parser *yaml_parser_t, event *yaml_event_t, empty bool)
| 1131 | // * ***** * |
| 1132 | // |
| 1133 | func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { |
| 1134 | token := peek_token(parser) |
| 1135 | if token == nil { |
| 1136 | return false |
| 1137 | } |
| 1138 | if empty { |
| 1139 | parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE |
| 1140 | return yaml_parser_process_empty_scalar(parser, event, token.start_mark) |
| 1141 | } |
| 1142 | if token.typ == yaml_VALUE_TOKEN { |
| 1143 | skip_token(parser) |
| 1144 | token = peek_token(parser) |
| 1145 | if token == nil { |
| 1146 | return false |
| 1147 | } |
| 1148 | if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { |
| 1149 | parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) |
| 1150 | return yaml_parser_parse_node(parser, event, false, false) |
| 1151 | } |
| 1152 | } |
| 1153 | parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE |
| 1154 | return yaml_parser_process_empty_scalar(parser, event, token.start_mark) |
| 1155 | } |
| 1156 | |
| 1157 | // Generate an empty scalar event. |
| 1158 | func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { |
no test coverage detected