X-Git-Url: http://andersk.mit.edu/gitweb/libyaml.git/blobdiff_plain/5e52c31904e21cf7a80a1ebd7a349c59f13e6aed..c9479c77ed4bd43099e53b272d395f62d58b461b:/src/parser.c diff --git a/src/parser.c b/src/parser.c index 81122f6..eb2a2c7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -319,7 +319,7 @@ yaml_parser_parse_stream_start(yaml_parser_t *parser, yaml_event_t *event) if (token->type != YAML_STREAM_START_TOKEN) { return yaml_parser_set_parser_error(parser, - "did not found expected ", token->start_mark); + "did not find expected ", token->start_mark); } parser->state = YAML_PARSE_IMPLICIT_DOCUMENT_START_STATE; @@ -393,7 +393,7 @@ yaml_parser_parse_document_start(yaml_parser_t *parser, yaml_event_t *event, if (!token) goto error; if (token->type != YAML_DOCUMENT_START_TOKEN) { yaml_parser_set_parser_error(parser, - "did not found expected ", token->start_mark); + "did not find expected ", token->start_mark); goto error; } if (!PUSH(parser, parser->states, YAML_PARSE_DOCUMENT_END_STATE)) @@ -701,7 +701,7 @@ yaml_parser_parse_node(yaml_parser_t *parser, yaml_event_t *event, yaml_parser_set_parser_error_context(parser, (block ? "while parsing a block node" : "while parsing a flow node"), start_mark, - "did not found expected node content", token->start_mark); + "did not find expected node content", token->start_mark); goto error; } } @@ -771,7 +771,7 @@ yaml_parser_parse_block_sequence_entry(yaml_parser_t *parser, { return yaml_parser_set_parser_error_context(parser, "while parsing a block collection", POP(parser, parser->marks), - "did not found expected '-' indicator", token->start_mark); + "did not find expected '-' indicator", token->start_mark); } } @@ -881,7 +881,7 @@ yaml_parser_parse_block_mapping_key(yaml_parser_t *parser, { return yaml_parser_set_parser_error_context(parser, "while parsing a block mapping", POP(parser, parser->marks), - "did not found expected key", token->start_mark); + "did not find expected key", token->start_mark); } } @@ -975,7 +975,7 @@ yaml_parser_parse_flow_sequence_entry(yaml_parser_t *parser, else { return yaml_parser_set_parser_error_context(parser, "while parsing a flow sequence", POP(parser, parser->marks), - "did not found expected ',' or ']'", token->start_mark); + "did not find expected ',' or ']'", token->start_mark); } } @@ -1127,7 +1127,7 @@ yaml_parser_parse_flow_mapping_key(yaml_parser_t *parser, else { return yaml_parser_set_parser_error_context(parser, "while parsing a flow mapping", POP(parser, parser->marks), - "did not found expected ',' or '}'", token->start_mark); + "did not find expected ',' or '}'", token->start_mark); } } @@ -1280,10 +1280,10 @@ yaml_parser_process_directives(yaml_parser_t *parser, } else if (token->type == YAML_TAG_DIRECTIVE_TOKEN) { - yaml_tag_directive_t value = { - token->data.tag_directive.handle, - token->data.tag_directive.prefix - }; + yaml_tag_directive_t value; + value.handle = token->data.tag_directive.handle; + value.prefix = token->data.tag_directive.prefix; + if (!yaml_parser_append_tag_directive(parser, value, 0, token->start_mark)) goto error;