Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token.
(parser *yaml_parser_t, typ yaml_token_type_t)
| 1230 | |
| 1231 | // Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. |
| 1232 | func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { |
| 1233 | // Reset any potential simple key on the current flow level. |
| 1234 | if !yaml_parser_remove_simple_key(parser) { |
| 1235 | return false |
| 1236 | } |
| 1237 | |
| 1238 | // Decrease the flow level. |
| 1239 | if !yaml_parser_decrease_flow_level(parser) { |
| 1240 | return false |
| 1241 | } |
| 1242 | |
| 1243 | // No simple keys after the indicators ']' and '}'. |
| 1244 | parser.simple_key_allowed = false |
| 1245 | |
| 1246 | // Consume the token. |
| 1247 | |
| 1248 | start_mark := parser.mark |
| 1249 | skip(parser) |
| 1250 | end_mark := parser.mark |
| 1251 | |
| 1252 | // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. |
| 1253 | token := yaml_token_t{ |
| 1254 | typ: typ, |
| 1255 | start_mark: start_mark, |
| 1256 | end_mark: end_mark, |
| 1257 | } |
| 1258 | // Append the token to the queue. |
| 1259 | yaml_insert_token(parser, -1, &token) |
| 1260 | return true |
| 1261 | } |
| 1262 | |
| 1263 | // Produce the FLOW-ENTRY token. |
| 1264 | func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { |
no test coverage detected