| 1153 | */ |
| 1154 | |
| 1155 | static int |
| 1156 | yaml_parser_remove_simple_key(yaml_parser_t *parser) |
| 1157 | { |
| 1158 | yaml_simple_key_t *simple_key = parser->simple_keys.top-1; |
| 1159 | |
| 1160 | if (simple_key->possible) |
| 1161 | { |
| 1162 | /* If the key is required, it is an error. */ |
| 1163 | |
| 1164 | if (simple_key->required) { |
| 1165 | return yaml_parser_set_scanner_error(parser, |
| 1166 | "while scanning a simple key", simple_key->mark, |
| 1167 | "could not find expected ':'"); |
| 1168 | } |
| 1169 | } |
| 1170 | |
| 1171 | /* Remove the key from the stack. */ |
| 1172 | |
| 1173 | simple_key->possible = 0; |
| 1174 | |
| 1175 | return 1; |
| 1176 | } |
| 1177 | |
| 1178 | /* |
| 1179 | * Increase the flow level and resize the simple key list if needed. |
no test coverage detected