Remove a potential simple key at the current flow level.
(parser *yaml_parser_t)
| 937 | |
| 938 | // Remove a potential simple key at the current flow level. |
| 939 | func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { |
| 940 | i := len(parser.simple_keys) - 1 |
| 941 | if parser.simple_keys[i].possible { |
| 942 | // If the key is required, it is an error. |
| 943 | if parser.simple_keys[i].required { |
| 944 | return yaml_parser_set_scanner_error(parser, |
| 945 | "while scanning a simple key", parser.simple_keys[i].mark, |
| 946 | "could not find expected ':'") |
| 947 | } |
| 948 | // Remove the key from the stack. |
| 949 | parser.simple_keys[i].possible = false |
| 950 | delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) |
| 951 | } |
| 952 | return true |
| 953 | } |
| 954 | |
| 955 | // max_flow_level limits the flow_level |
| 956 | const max_flow_level = 10000 |
no test coverage detected